Difference between revisions of "Tracking Library Use"

From AtlasWiki
Jump to: navigation, search
Line 1: Line 1:
Where is this library being used?
+
== Where is this library being used? ==
  
 
1. Find library in question.
 
1. Find library in question.
 +
 +
[[File:onConfigurationChanged.png|500px]]
 +
 
2. If concerned with particular methods/fields, use call-step/dataflow-step.
 
2. If concerned with particular methods/fields, use call-step/dataflow-step.
3. If concerned with entire library, put library into Connection View leaves pane.
 
  
[[File:LibraryReverseCall.png|200px|right]]
+
3. If concerned with entire library, put library into <b>Connection View</b> leaves pane.  We'll choose this option to display a reverse call graph of the entire package.  Enter the package into the Connection View either by dragging and dropping it into the leaves pane or by right-clicking the package and selecting <code>Atlas -&gt; Connection View -&gt; Add To Leaves</code>.
 +
 
 +
[[File:LibraryReverseCall.png|450px]]
 +
 
 +
The resulting graph shows us a graph of all calls that lead to the <code>android.content.pm</code> package.  We can see that the package we're concerned with is used by three methods in two classes. 
 +
 
 +
4. Either put relevant classes and methods into roots pane, or put items into omissions pane.  We will do the former.
 +
 
 +
[[File:LibraryAddRoots.png|450px]]
  
4. Either put relevant classes and methods into roots pane, or put items into omissions pane.
 
 
5. Calls now visible more explicitly
 
5. Calls now visible more explicitly
 +
 +
[[File:LibraryFiltered.png|500px]]
 +
 +
6. Double-click on other calls to examine them in the source code.  Let's look at the other method in our class that calls <code>android.content.pm</code> first.  Double-clicking the method takes us to the method declaration, or double-clicking the call edge directly highlights the line where the library is called.
 +
 +
[[File:ConfigureOrientation.png|700px]]
 +
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 +
[[File:FollowEdge.png|300px]]

Revision as of 01:47, 21 April 2015

Where is this library being used?

1. Find library in question.

OnConfigurationChanged.png

2. If concerned with particular methods/fields, use call-step/dataflow-step.

3. If concerned with entire library, put library into Connection View leaves pane. We'll choose this option to display a reverse call graph of the entire package. Enter the package into the Connection View either by dragging and dropping it into the leaves pane or by right-clicking the package and selecting Atlas -> Connection View -> Add To Leaves.

LibraryReverseCall.png

The resulting graph shows us a graph of all calls that lead to the android.content.pm package. We can see that the package we're concerned with is used by three methods in two classes.

4. Either put relevant classes and methods into roots pane, or put items into omissions pane. We will do the former.

LibraryAddRoots.png

5. Calls now visible more explicitly

LibraryFiltered.png

6. Double-click on other calls to examine them in the source code. Let's look at the other method in our class that calls android.content.pm first. Double-clicking the method takes us to the method declaration, or double-clicking the call edge directly highlights the line where the library is called.

ConfigureOrientation.png        FollowEdge.png