OSDN Git Service
Add a hyperlink resolved for Android XML files
This changeset adds basic hyperlink handling to Android XML files
(such as AndroidManifest.xml and layout xml files).
It registers a hyperlink detector for our XML files, and the hyperlink
detector looks up the XML model and finds the node and attributes
under the cursor. If found. it then checks these attributes for a set
of patterns that it can link to:
* If it finds an <activity> element, it looks up the activity name and
the package on the root element, and lets you jump to the activity.
Ditto for services.
* If it finds a @layout attribute value, it attempts to open the
corresponding layout file in the res/ folder in the project. Ditto
for other per-file resources like @drawable, etc.
* If it finds a value resource, like @string, @dimen, etc, it will
search through the various XML files in values/ and open up the
corresponding XML declaration in the editor with the declaration
selected.
Note that the resolver does NOT use proper full resource resolution
based on the SDK parsing that we have in use within the layout editor
etc. That's the natural next step.
Change-Id: I5880878fe67f26fb8d3b08b808c02baa1049f2c5