当前位置:网站首页>The idea of the diagram
The idea of the diagram
2022-08-04 01:32:00 【Can't type 314】
diagram usage in idea
Reference URL:
https://mp.weixin.qq.com/s/BLIuW_xjN8Tnd0ZxqC1dlQ
Description
This article basically summarizes all the usage of diagram, to prevent loss, collect and reprint a wave
1. View the inheritance chain in graphical form
In the tab of the class you want to view, right-click and select Diagrams, there are show and show … Popup, but the former is newly created in the tab, and the latter is displayed in the form of a floating window:
Actually, you can also right-click on the class you want to view from the project directory tree on the left, and select Diagrams as well, the effect is the same:
Then you will get the inheritance relationship graph as shown below, taking a custom servlet as an example:
It is obvious that:
- The solid blue arrow indicates the inheritance relationship
- The green dotted arrow refers to the interface implementation relationship
2, optimize the inheritance chain graphics, think what I think
2.1 remove unrelated classes
Some of the inheritance relationship graphs obtained are not what we want to know, such as Object and Serializable in the above figure. We only want to care about the important inheritance relationships of Servlet. What should we do?
Simple, delete.Click to select the class you want to delete, then just use the delete key on your keyboard.After cleaning up the relationships of other classes, the graph is as follows:
2.2 Display class details
Some people say, eh, how can that be enough? I also want to see the inherited methods?Simple, IDEA has everything for you.
Right-click on the page, select show categories, and expand the properties, methods, constructors, etc. in the class as needed.Of course, the second method can also directly use the above toolbar:
Then you will get:
What, do you still want to filter in the method, for example, you want to see protected permissions and above?Simple, right-click to select Change Visibility Level, and adjust as needed.
What, do you think the graphics are too small for you to see clearly?IDEA can also satisfy you. Press and hold Alt on the keyboard, and a magnifying glass appears. Is it surprising or unexpected?
2.3 Add other classes to the relationship
When we also need to check whether other classes have an inheritance relationship with the current class, we can choose to add them to the current inheritance relationship graph.
Right-click on the page, select Add Class to Diagram, and then enter the class you want to add:
For example, we added a Student class as shown in the following figure.Well, there is no arrow, it seems that it has no indescribable relationship with the current classes and interfaces:
2.4 View specific code
If you want to view the specific source code of a certain class, such as a certain method, of course, it is impossible to display it on the graphics, otherwise the screen will not be able to explode?
But you can use graphics, or cooperate with IDEA's structure to easily and quickly enter the source code of a class for viewing.
After double-clicking a class, you can walk in the method list under it. For the method you want to view, right-click and select Jump to Source:
After selecting the structure in the left column, all the methods in the class will be displayed on the left as shown in the figure above. Click which method, and the page content will jump to the method section.
3, last
08464499)]
After selecting the structure in the left column, all the methods in the class will be displayed on the left as shown in the figure above. Click which method, and the page content will jump to the method section.
3, last
Using the IDEA functions mentioned above, learning and viewing class relationships, and understanding things such as mainstream framework source code, can be said to be very comfortable.
边栏推荐
- 【store商城项目01】环境准备以及测试
- 网络带宽监控,带宽监控工具哪个好
- Slipper - virtual point, shortest path
- LeetCode third topic (the Longest Substring Without Repeating Characters) trilogy # 3: two optimization
- How to copy baby from Taobao (or Tmall store) through API interface to Pinduoduo interface code docking tutorial
- LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
- typescript51 - basic use of generics
- C # WPF equipment monitoring software (classic) - the next
- 一篇文章看懂JS闭包,从执行上下文角度解析有趣的闭包
- .NET静态代码织入——肉夹馍(Rougamo) 发布1.1.0
猜你喜欢
nodejs+npm的安装与配置
TensoFlow学习记录(二):基础操作
Installation and configuration of nodejs+npm
如何通过单步调试的方式找到引起 Fiori Launchpad 路由错误的原因试读版
Demand analysis of MES management system in electronic assembly industry
ASP.NET 获取数据库的数据并写入到excel表格中
Analysis: What makes the Nomad Bridge hack unique
What warehouse management problems can WMS warehouse management system solve in the electronics industry?
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
jmeter分布式压测
随机推荐
工程制图平面投影练习
[store mall project 01] environment preparation and testing
What warehouse management problems can WMS warehouse management system solve in the electronics industry?
typescript56-泛型接口
Vant3 - click on the corresponding name name to jump to the next page corresponding to the location of the name of the TAB bar
C 学生管理系统_添加学生
网络带宽监控,带宽监控工具哪个好
initramfs详解----添加硬盘驱动并访问磁盘
观察者模式
typescript52 - simplify generic function calls
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
电子组装行业对MES管理系统的需求分析
.NET Static Code Weaving - Rougamo Release 1.1.0
如何通过单步调试的方式找到引起 Fiori Launchpad 路由错误的原因试读版
How to find the cause of Fiori Launchpad routing errors by single-step debugging
简单的线性表的顺序表示实现,以及线性表的链式表示和实现、带头节点的单向链表,C语言简单实现一些基本功能
splice随机添加和删除的写法
vxe-table 从页面批量删除数据 (不动数据库里的数据)
WMS仓储管理系统能解决电子行业哪些仓库管理问题
可变字符串