1, view graphics in the form of inheritance chain
In the tab you want to view the class, right click and select Diagrams, which show and show ... Popup, but the former within the new tab page, which appear as a floating window:
In fact, you can project from the left side of the tree, you want to see the class right click and select the same Diagrams, the effect is the same:
Then you will get the inheritance pattern shown in the following figure, to custom controller as an example:
The whole is not particularly obvious, we use the service as an example, look again:
is obvious that:
The dotted line indicates the packet
Green dashed arrows refer interface relationship
Added: solid blue arrow means inheritance
2, optimized graphics inheritance chain, like I think
2.1 remove the class does not care about
Inheritance graphics get, some not what we want to know, such as a map service package, we just want to care about important relationships IDocTestService, how do?
Simple, deleted. Click to select the class you want to delete, and then directly use the delete key on the keyboard on the line . After cleaning up the relationship between other classes of graphics as follows:
Details 2.2 show class
Some people say, eh, how does this enough, that those methods inherited I also want to see ah? Simple, IDEA meet you all.
Right-click the page, select show categories, you can expand as needed class properties, methods, constructors, and so on. Of course, the second method can also be used directly on top of the toolbar:
Then you get:
What, you want a method in the screening, for example, you want to see protected rights and above range? Simple, right click and choose Change Visibility Level, adjust as required.
What, you too graphic is too small you can not see? IDEA also satisfy you, hold down the keyboard's Alt, actually had a magnifying glass, no surprise surprise, meaning not an accident?
2.3 was added to the relationships to other classes
When we also need to see whether the current class and other classes have inheritance relationship, we can choose to add it into the current pattern of inheritance come.
Right-click the page, select Add Class to Diagram, and then the class you want to join it:
For example we added a UserContext class, as shown below. Well, not any of the arrow, and it seems that the current number of classes and interfaces that it does not matter what happened can not be described:
2.4 Specific Code View
If you want to see a class, such as the source code of a specific method, of course, it is impossible for you to show up on the graph, or screen shall also hold deep-fried?
But you can use graphics, or IDEA with the structure quickly and easily into the source code of a class to view.
After double-clicking a class, you can walk under it in the list of methods, for the way you want to view, select and right-click and select Jump to Source:
After entering a class, if you want a quick look at other methods of the class, you can also make use of structure functions IDEA provides:
3, final
IDEA with these features mentioned above, learning and view class relationships, to understand things like the mainstream framework source code and the like, can be said to be very comfortable.
Digression: Welcome attention, comments, thumbs up, your encouragement is my creative power!