OSDN Git Service

Pick configuration for Java hyperlinks
authorTor Norbye <tnorbye@google.com>
Fri, 11 Feb 2011 17:23:39 +0000 (09:23 -0800)
committerTor Norbye <tnorbye@google.com>
Fri, 11 Feb 2011 17:23:39 +0000 (09:23 -0800)
commit5bd42a1a4d7894ab0a2f8e334066baa380eda5d7
tree14a3e0c6145a61b9d74e866be6fbab92cd69c41a
parent7d502fb23dcac8683fbddadf7614de7a25f55347
Pick configuration for Java hyperlinks

When you request declaration hyperlinks in an XML file, the hyperlink
support looks at the corresponding Layout editor's configuration
chooser and uses the current configuration to decide which match to
list on top. Therefore, if you are looking at a particular language
and you ask for declarations for a given @string resource, the
translation for the current language is listed first.

In Java files, there is no corresponding layout editor, so it will
just display the base folder (values/) match rather than any
particular language (or other qualifiers for that matter).

This changeset adds a check to the code which computes a configuration
to use for default matching. It now looks for other open layout
editors in the workspace and (for any that are in the same project) it
will use that editor's configuration instead as the default key.

Change-Id: I0dc9d4a7970c5aebd07d3e88877ac41fe49baab8
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java