There is no built-in support for producing a global call graph. If you need
this, you'll just need to add a visitor for MethodInvocation nodes, and for
each one, go up to the surrounding MethodDeclaration node and now you can
add a graph link from the method to the called method.

On Tue, Jun 16, 2015 at 9:54 AM Adorilson Bezerra de Araújo <
[email protected]> wrote:

> My intend with this was discover if FragmentManager.beginTransaction()
> method was called in onCreate method,
> recursively incluse.
>
> I done it in this commit:
>
> https://github.com/adorilson/android-lint-checks/commit/8186c23154af6700b631fec4065708d2511bf457
>
>
>
>
> 2015-05-25 16:39 GMT-03:00 Adorilson Bezerra de Araújo <
> [email protected]>:
>
>> Hi,
>>
>> imagine I have the follow methods:
>>
>>     @Override
>>     protected void onCreate(final Bundle savedInstanceStace){
>>         super.onCreate(savedInstanceStace);
>>         setContentView(R.layout.main);
>>
>>         configLayout();
>>     }
>>
>>    private void configLayout(){
>>         MenuFragment menuFrag = new MenuFragment();
>>
>>         FragmentTransaction transaction =
>> getSupportFragmentManager().beginTransaction();
>>
>>         if (findViewById(R.id.main)!=null){
>>             transaction.add(R.id.main, menuFrag);
>>         }else{
>>             transaction.add(R.id.menu, menuFrag);
>>             transaction.add(R.id.content, new ContentFragment());
>>         }
>>
>>         transaction.commit();
>>     }
>>
>> How I can print something like this?
>>
>> onCreate
>>     onCreate
>>     setContentView
>>     configLayout
>>          MenuFragment
>>          getSupportFragmentManager
>>          beginTransaction
>>          findViewById
>>          add
>>          add
>>          add
>>
>> ps: I need this for debug propose, mainly.
>>
>> txs.
>> --
>> Adorilson Bezerra
>> Mestrando em Engenharia de Software
>>
>
>
>
> --
> --
> Adorilson Bezerra
> Mestrando em Engenharia de Software
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to