aboutsummaryrefslogtreecommitdiffstats
path: root/layoutopt/Android.mk
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-09-28 07:42:38 -0700
committerXavier Ducrohet <xav@android.com>2011-09-29 14:18:21 -0700
commit3f05dce571bfedfdabf6b1f7d8f8a1c05c62317e (patch)
tree3344f4e68cf340c47ad05a4520f97d762593c317 /layoutopt/Android.mk
parent0f2c305640a83b480691dc9002eb2ff5c808dff2 (diff)
downloadsdk-3f05dce571bfedfdabf6b1f7d8f8a1c05c62317e.zip
sdk-3f05dce571bfedfdabf6b1f7d8f8a1c05c62317e.tar.gz
sdk-3f05dce571bfedfdabf6b1f7d8f8a1c05c62317e.tar.bz2
Cherrypick fcd339 from master. do not merge.
Find non-constant expr errors and offer migration explanation In ADT 14, library projects will generate R fields that are not constant, which means you cannot use them as case labels in a switch statement. This means some existing projects may not compile. However, the reason for this isn't obvious until you know the details of how library projects work. Also, converting switch statements to if/else statements is easy in Eclipse but that may not be known to all users. This changeset adds a quickfix processor which recognizes the specific compilation error (non-constant expressions cannot be used in case statements), and if it looks related to Android R fields, then it creates a fix proposal. The fix proposal is simple: it just opens a dialog which explains the problem, and explains how to fix it (along with a hyperlink to more information on the ADT 14 update process). The main advantage of this approach is that it shows up as a lightbulb right in the editor margin (for those users who are affected by this error only), and even just hovering over the error will show the fix display string which talks about Migrating Android code and the extra info states that the fix can be invoked for more info. Change-Id: Ieb208ac459454310f5a6cce6e933d9115a135322
Diffstat (limited to 'layoutopt/Android.mk')
0 files changed, 0 insertions, 0 deletions