Next very important thing that we are going to look at as source code navigation these are the specific 2
main items that we would look at. 3
And they're very commonly used Fussell to look at type exploration which include stuff like searching 4
for types like classes and interfaces and Valke meant that can contain and things like that. 5
Next we will look at Methot exploration victualling knowing things like how to navigate a particular 6
matter from the point of invocation or which methods are invoking a particular method. 7
Third we will look at how we can search for specific strings in the entire workspace or how we can search 8
for specific Djala constructs like metal Sophies. 9
Main thing you would learn would be some really important shortcuts. 10
OK let's switch over to eclipse now. 11
OK let's begin with type exploration. 12
And often we would like to search for a specific type like a class or an interface. 13
Ok so for that all we need to do is just hit Control shift. 14
D where the stands for type on. 15
Let's say you want to search for basics demo. 16
As we are typing you can see that in real time there is a search operation that is going on under to 17
showing all the all the matches real time matches. 18
And let's say we just want to look for this particular class BASIX demo and here it is. 19
And so that's how you would search for that type. 20
And let's say the next thing is we want to get an outline of the class make what matters it has on stuff 21
like that. 22
So there are three ways to do it. 23
One is you can do it from the package Explorer. 24
Just click on the basics demo class and you can see that all the members that it has and and the the 25
quick way to do it as just hit control or and that search so this pop up as a quick outline and all 26
you do is head control and all stands for outline. 27
OK. 28
And you can look at all the methods and you can even search for those methods in the example print here 29
. 30
And if you want to go there just double click on that and you're here a different method. 31
So that's a second way it will do it control. 32
And a third way is just right click on that and says Sure. 33
And Brett Graham and there you go. 34
Here you how hard it sure. 35
The Brit commission here breadcrumb is nothing but it's just a path that it shows like Des Moines. 36
The project's sources are so scored on here as a package and within the package we have this glass and 37
you can look for any specific methods on members of the class or here on if you want to just hide it 38
just right click on this bar and see hide Brett grum on your gun. 39
So that's the hard way of doing it. 40
Personally a strict control always the best quickest way to quote an old link. 41
Third thing is let's look at type hierarchies. 42
So let me just open this glass X Okay and just click on this glass here and just right click Ironhead 43
are open type hierarchy and then you go on for that glass. 44
It is showing the type hierarchy. 45
The tree 900 and street. 46
And it is also showing a subclass of itches B which is extending this glass. 47
OK. 48
So that's for the class. 49
Now let's look at it for an interface. 50
You can just hear x' x to implement this interface low let's just click on that and say open by hierarchy 51
to showing the interface seat but it does interface C actually extends and of that interface called 52
interface. 53
But it only shows interface C and all the classes that are implementing it. 54
OK so it's basically showing the subtypes off C so it doesn't show any supertype. 55
Office. 56
OK. 57
That's how you would look at type hierarchy. 58
But there is also a shortcut for those and all you could do is just click on this here and hit until 59
D. 60
OK. 61
And once again. 62
So this quick Konsole quick can sort of shows up on Nitro's the exact type hierarchy in the pop up. 63
OK. 64
Underdose and it is only a control. 65
Looks like it shows up pop up here. 66
So that's controlled deep and you can do the same here also control D and that's all. 67
So that's type expedition. 68
Next let's look at motard exploration unfought that I will show a different code base data. 69
How much is a much more larger and I think it will be much more useful to show it with a large codebase 70
. 71
So let's do that OK here is a different code base. 72
And let's say first thing that we want to do and METAR exploration is let's say we have this method 73
invocation here and we want to look at the matter definition. 74
All you need to do is just click there and hit F tree and that's it you are you'll be taken to the method 75
definition. 76
OK. 77
So let's just go back one going back. 78
You can hit this button here. 79
Back button. 80
So we are back here. 81
So that's how we and I we get with a motard definition. 82
Now let's say we have this method called send request. 83
Now let's say we want to see which other methods are invoking this method. 84
OK so let's let's if we want to look at the method invocations. 85
So just highlight doc encik control shif G. 86
And here you go. 87
So if you look at here it shows all the methods that are invoking the send request method. 88
OK. 89
So these are all the matters that are invoking it. 90
And you can click on them and then it shows this and if you want and I'll be good back Baghdad district 91
on three again you are here. 92
OK so that's knowing about the math in question something that's gone through a shift G. 93
So F 3 uncontrolled G are very commonly used shortcuts. 94
3 is. 95
Now we get them at their definition and control shift G is for going to get them entering locations 96
. 97
OK now let's say we want to look at the call hierarchy itself. 98
And for that we can do can control out which it is. 99
So it shows all the methods that are invoking send requests once again. 100
But if you you can go ahead and we can browse through the call hierarchy so authenticate user here as 101
being called by this method call log in and log in is being invoked by another method called log in 102
from some other class. 103
So the log in is in Done being invoked from this Glasscock from this method called much and Drogin you 104
see. 105
So this is the call hierarchy. 106
And so if adopted as control. 107
I looked at each ok at stands for hierarchy and that's it that's. 108
Are the most important or most commonly used shortcuts for motard navigation. 109
OK so next let's look at a search feature and for that let me just go back to our our own code base 110
before showing you the search feature. 111
I want to show you something which I forgot earlier. 112
So earlier we saw that we need to hit Control shift d in order to search for that type. 113
Another way to do it is just going to navigate and hit open type here. 114
And that would show the same concern but I would definitely recommend using the control shifty as it 115
is much more quicker to get here. 116
So that's about that. 117
So there are other shortcuts are just shortcuts but there are always other ways to do it but it's better 118
to always learn the most frequently used shortcuts. 119
OK so now let's look at the search feature for that. 120
All you need to do is hit an edge or just going to that's going to search here and click on search. 121
And here you how different apps. 122
So let's say you want to do a string search across the entire workspace just go here and type in let's 123
take one example. 124
And it would show one result here showing one is there so just click on that and nerdish as you can 125
see that is the next out here. 126
And so that's how you'll search for strings. 127
Now let's say you want to search for a specific construct. 128
OK. 129
So let's for that you go into this type Jawa search and let's say you want to search for a field named 130
as Id look for all classes are interfaces that how type and how field called ID and for that you just 131
select field here. 132
And we are also specifying saying that search in is required by x even Jayati libraries and dentata 133
workspace here and just collect such and as you can see to showing 454 reference's. 134
So that's the searching for constructs and final thing is it's the simplest thing is to just search 135
within a file on Birdsell just like the extra or or just do a control and you can search and you can 136
also replay sekret you can also replace it with any any any other string. 137
OK. 138
So that's about it. 139
So let's just go ahead and review the shortcuts once again. 140
Here is a summary of all the shotguns that we look at the first three or 11 book types. 141
The next three are relevant to methods and the final one is relevant to such. 142
The first one is control shift. 143
And you would use doc for searching for that type. 144
OK. 145
So behere. 146
As for pipe next to it all which shows a quick outline of the pipe which means you can look at all the 147
methods in the eye and it shows a pop up for that. 148
The third one is contradictory and it shows the type hierarchy. 149
It's the quick type hierarchy and you can look at the entire i-Pad on the inheritance tree as tree which 150
is to navigate to a particular matter from the point of the matter in location. 151
That's a very commonly used. 152
51 is containership. 153
And that's true. 154
Look for any method invocations. 155
So if you are at a method only if you want to see all the methods that are in working it so that you 156
can grow HFM G contour add edge is for method call hierarchy. 157
So it stands for hierarchy. 158
Finally control etche is for the search console itself. 159
So those are all the shortcuts that we have up there. 160
And this lesson