8cf21be14c49245cb4bc967e81d8d7bc798179b7 |
|
07-Dec-2012 |
Tor Norbye <tnorbye@google.com> |
Refactoring fixes This CL contains a couple of tweaks to the refactoring support. First, update <declare-styleable> declarations for renamed custom views. Second, update XML in downstream projects from library projects. Third, allow invoking the rename refactoring from XML files from class attributes and custom view tags as well (until now it applied only to resource names.) Finally, update unit test golden file format to include whether each change is enabled, and tweak the code to disable R class changes to handle some additional scenarios. Change-Id: I74ccbe1b0f15ec10429f8dda7674f51f9a6f83cd
|
7e3452665f6672c8a42710b799a1f69e26e3d98d |
|
05-Dec-2012 |
Tor Norbye <tnorbye@google.com> |
Fix Rename Application Package such that it doesn't touch bin/ Fix the rename application package refactoring such that it only modifies AndroidManifest.xml, not for example a copy in bin/. Also added a diagnostic information message to the plain Java package refactoring, shown when refactoring the application package, explaining that the refactoring will not actually change the manifest package, and explaining how to invoke the dedicated refactoring to change it. Also add unit tests for this refactoring. Change-Id: I13054e033b9ee44210ca341f00c633d73a4418b4
|
474bd94478a8ced503e292b17c7e5962de414d99 |
|
30-Nov-2012 |
Tor Norbye <tnorbye@google.com> |
Code completion improvements for custom views and themes This changeset adds custom view completion to the content assist. Code completion for elements (e.g. from text context or inside a <) should now include custom views found in the project, and prefix typing should work as well. Similarly, code completing inside a <fragment> name attribute or a <view> class attribute should complete fragment and view classes. It will display javadocs for these classes, if available. It also hooks up class completion in manifest files, so completing <activity>, <application>, <receiver> etc android:name attributes should show matching classes corresponding to the tag being edited. The completion will also always complete theme references (?) even when there is no known metadata for the tag, such as for an arbitrary custom view. Also fix descriptor metadata such that <view> and <requestFocus> show up in code completion, works properly for layout editor palette drag (with a class selection popup) and with a suitable outline icon. Also tweak refactoring such that it handles both class= and android:name usage for <fragment> elements. Finally, for the LinearLayout automatically added inside new ScrollViews, set the vertical attribute since that's usually what you want. Change-Id: Ifc98c19607ddc4e69d7645f2720120ce72d0cd95
|
32654dfbd134559fbf6bec4542d6a4a8105897c9 |
|
03-Dec-2012 |
Tor Norbye <tnorbye@google.com> |
Fix rename type, rename package and move type refactorings This CL updates the various refactorings to properly handle layout refactoring such that it not only updates custom views, but also updates fragment references, tool:context references etc. It also fixes missing manifest updates (such as replacing the parentActivityName attributes). Most importantly, it also fixes bugs where the wrong elements in the manifest could get updated. There are a lot of diffs in this CL because I basically replaced the old refactoring code (which had a lot of custom text change and document manipulation code) with code based on the new resource refactoring, where there is a single iteration of the XML documents. This also improves the emitted refactoring elements such that it only lists each file once. Also updated the unit tests to check additional scenarios; adding a second activity with the same prefix as the first is what revealed the broken document handling in the old code. Change-Id: I7c5959ca6b046ce3dab566663988cdd0389b0e5b
|
13945169f077dcd1260fae9c532d9c1e57cb98e3 |
|
16-Nov-2012 |
Tor Norbye <tnorbye@google.com> |
Fix rename package refactoring This changeset fixes a couple of bugs in the package rename refactoring code, including 34466: Android refactoring participant gives NPE It also fixes a bug in the move type refactoring, and adds unit tests for package rename, move type, and rename type. Change-Id: I4f43aabbcf1aeddc6c27011bfcffbe5a49c42372
|
d0dc5ae322e6438704094cb02e6163b1f17b7c4d |
|
07-Oct-2012 |
Raphael Moll <ralf@android.com> |
ADT Refactoring: 2 minor fixes. This fixes 2 minor issues in the "android type rename" refactoring: - the oldName vs newName was inverted in _some_ of the refactorings. It was still properly working due to pure luck. - I've added an heuristic: if for example an <activity> uses the fully qualified name for its class name attribute, then the refactoring should not collapse it to the short notation (".MyClass"). Make it respect whether the developper choose to expand or not the class name. This still does not fix SDK bug 21589. Change-Id: I2f189508979710a6fab5c2f6db360c3776a5930e
|
d2267de8e8dadc8446a664c6a5e6b7ef5e71bbb7 |
|
07-Oct-2012 |
Raphael Moll <ralf@android.com> |
ADT Refactoring: merge duplicate packages. This is a pure-refactor that merges adt.internal.refactoring into adt.internal.refactorings (note the 's' on the 2nd one). Makes more sense to not have 2 packages for the same thing. Change-Id: I1dae60d18222e556f5140be579d4f84bb1bf7cd4
|