diff options
author | Tor Norbye <tnorbye@google.com> | 2012-12-03 10:03:07 -0800 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-12-03 10:27:54 -0800 |
commit | 32654dfbd134559fbf6bec4542d6a4a8105897c9 (patch) | |
tree | fc8563ab428eef9d9759421283cb88643dce05b9 /eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2 | |
parent | 6c7924f6fea737bf5c87c1a6b845d690b8c46099 (diff) | |
download | sdk-32654dfbd134559fbf6bec4542d6a4a8105897c9.tar.gz |
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
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutMetadata.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutMetadata.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutMetadata.java index 94bd05809..b79e3b0a1 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutMetadata.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/LayoutMetadata.java @@ -56,7 +56,6 @@ import java.util.Map; /** * Design-time metadata lookup for layouts, such as fragment and AdapterView bindings. */ -@SuppressWarnings("restriction") // XML DOM model public class LayoutMetadata { /** The default layout to use for list items in expandable list views */ public static final String DEFAULT_EXPANDABLE_LIST_ITEM = "simple_expandable_list_item_2"; //$NON-NLS-1$ @@ -75,6 +74,8 @@ public class LayoutMetadata { public static final String KEY_LV_FOOTER = "listfooter"; //$NON-NLS-1$ /** The property key, included in comments, which references a fragment layout to show */ public static final String KEY_FRAGMENT_LAYOUT = "layout"; //$NON-NLS-1$ + // NOTE: If you add additional keys related to resources, make sure you update the + // ResourceRenameParticipant /** Utility class, do not create instances */ private LayoutMetadata() { @@ -191,9 +192,6 @@ public class LayoutMetadata { return; } Display display = AdtPlugin.getDisplay(); - if (display == null) { - return; - } WorkbenchJob job = new WorkbenchJob(display, "Update alternate views") { @Override public IStatus runInUIThread(IProgressMonitor monitor) { |