OSDN Git Service

Fixing Android Source attachements
authorsnpe <snpe@snpe.rs>
Sun, 23 Jan 2011 15:41:03 +0000 (16:41 +0100)
committersnpe <snpe@snpe.rs>
Fri, 11 Feb 2011 19:06:55 +0000 (20:06 +0100)
commit6b85dfa59b3937b5a20e0f5d50ed05e2b3c5d0a4
treec2944569dbc86a4e280d25344e9b8034a9c1d8f1
parent7d502fb23dcac8683fbddadf7614de7a25f55347
Fixing Android Source attachements

Steps to reproduce:

- add Android Source code to android.jar (you can install Android
  Sources plugin from http://code.google.com/p/adt-addons/)
- ensure that android.app.ActivityThread exists in the source
  attachement (if you use Sources plugin, it exists)
- create an Android application and add the next code to
  onCreate method:
super.onCreate(savedInstanceState);
        Object obj = null;
        System.out.println(obj.toString());
        setContentView(R.layout.main);
- set breakpoint at line
  System.out.println(obj.toString()); (NPE)
- debug the application
- wait that apps stop on breakpoint
- click Step Over

The procces will proceed in ActivityThread, but source is not shown.

The problem happens because the Android source locator introduced in
https://review.source.android.com/#change,16569 isn't correct.
ActivityThread.java isn't included to android.jar, but can be
included in the source attachement. This change adds source to Android
launch configuration too.

Change-Id: Id13ef9acac9a901a704ae79d3e3db3be5e09d929
eclipse/plugins/com.android.ide.eclipse.adt/plugin.xml
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sourcelookup/AdtSourceLookupDirector.java