summaryrefslogtreecommitdiff
path: root/android/testData/folding
AgeCommit message (Collapse)Author
2014-02-10Resource folding for quantity stringsTor Norbye
Change-Id: Iffc3d57cd84650348b91962478f721b8bbca6957
2013-10-2261311: Invalid resource references should not be foldedTor Norbye
Change-Id: Ib4a40c5008ad54bb6481bdbfb28fe37bdea9c04a
2013-10-09Show quotes around dimensions in XML attributesTor Norbye
Additional fix for issue 60823; we should include quotes when the string is replacing an attribute value. Change-Id: I0abb139352663ba9eb3f922dd6de9a1bd4ad27b3
2013-10-0860823: Don't show quotes around inlined resouces of type integer.Tor Norbye
Change-Id: I476346eacfcb0c5acaa3108a31e9141e4670c96b
2013-10-0160529: Inlined resources sometimes shows obsolete/wrong contentsTor Norbye
This changeset fixes the resource inlining (editor folding) in three ways: * First, it fixes the various bugs related to element caching which meant that you could see obsolete contents after editing an expression, or that you couldn't get resource folding on an element after typing it in, etc. * Second, it now also inlines dimensions and integers, as requested by several users. * Third, it now inlines resource string references to unknown calls an outside call expressions. (Before this we would only inline strings that were calling framework methods we had annotated as pertaining to string lookup; it will now inline any R.string reference.) To fix the caching bug I basically removed the element-to-resolved- string cache, and instead made the lookup code much faster, since when annotating all field references we no longer need to resolve method calls and look up parameter annotations. It now instead visits all the references and quickly determines whether they correspond to a resource field, and only in that case does it do the remaining computations. Change-Id: I0841340ccfa41aa1ae997d8c5553dca2662c8452
2013-06-26Test fixesTor Norbye
Change-Id: I62bc25408a40a2d3e8d1cb31efc624c10715e2c0
2013-04-19Drive resource string folding preview from annotations dataTor Norbye
This changeset updates the string folding preview code to determine whether a given method call or parameter reference should be folded to show a R.string value inline based on annotations metadata rather than hardcoding it to the getString() call. This means it can now start showing string previews for calls like Button.setText(int resid) since the first parameter is annotated with @ResourceInt(STRING). This CL also improves the folding builder a bit; values are now cached, and the cached values implement ModificationTracker hooked up to the project resources such that editing values in strings.xml and switching back to Java or Layout XMLs will refresh the folded string previews. Change-Id: I2e7911fb5d84bdee2e3cb2317ad8ff4af7f204fb
2013-04-18Resource string inlining: Insert formatting expressionsTor Norbye
When folding getString calls, and the resolved string contains formatting arguments, show the given expressions or constants in the string. For example, for the call getString(R.string.foo, myVar, 42) show "Value is {myVar}, score is {42}" rather than "Value is %1$s, score is $2$d" Change-Id: Ia2c8b69c1f4df53249d68019aa3776bd86469b51
2013-04-18Add custom code folding for Android to resolve string resourcesTor Norbye
This will show the default string values of resources in place of getString(R.string.name) in Java files and in place of @string/name references in XML attribute values. Change-Id: I1585fc6a2314b25ac22027fde9fef5862cbbdf34