OSDN Git Service

Suggest similar class names or missing pkgs in the error console
authorTor Norbye <tnorbye@google.com>
Thu, 9 Jun 2011 00:19:20 +0000 (17:19 -0700)
committerTor Norbye <tnorbye@google.com>
Thu, 9 Jun 2011 00:19:20 +0000 (17:19 -0700)
commitc99b6718c30d75adb36727d3f9feaa4e89c5d181
treec89cfdca6c40cf61c301ad912142ea6f18eda578
parent52a4e9a3afd7aecd06801b42d2ba8786ce824921
Suggest similar class names or missing pkgs in the error console

If the layout XML file contains typos, the rendering will fail and the
canvas will list the missing classes along with hyperlinks to create a
new class, configure the build path etc.

This changeset looks for "typos" in the view names and if it finds a
similar real view class, either among the Android views or among the
custom views in the current project, then it will add a hyperlink
suggestion to fix the XML by editing the name to the correct spelling.

It also handles the scenario where you have typed in a custom view
class name correctly, but have forgotten to include its package.

In a followup changeset this functionality will be available from the
XML editing quick assistant as well.

Change-Id: Iaefd3f503795e25e6eb38353c60c645061d4814e
eclipse/dictionary.txt
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtUtils.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CustomViewFinder.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/AdtUtilsTest.java