From f5256a38ef2e429b5efd4482808bc902bf7634e3 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Mon, 22 Aug 2011 17:32:40 -0700 Subject: [PATCH] Misc refactoring and test fixes This changeset turns on automatic formatting of the affected regions in extract include, change layout, wrap in and style refactorings. It also fixes a couple of minor bugs - one handling empty tags in the change widget type refactoring, and one handling selection offsets. It also turns on automatic formatting of GUI editor changes (there was a previous changeset which prepared for this but forgot to actually switch the default option.) This changeset also makes various test infrastructure fixes: code completion tests recently stopped working for a number of files (something about the initialization order of editor types when running as tests). I also tweaked the goldenfile format of the diffs to avoid trailing diffs on lines with just a ">" or "<" since gerrit makes thee light up in red. Change-Id: I78b858f0b21e5b2f25a9566ad495bad09c66a18f --- .../refactoring/ChangeLayoutRefactoring.java | 11 ++- .../layout/refactoring/ChangeViewRefactoring.java | 15 ++- .../refactoring/ExtractIncludeRefactoring.java | 23 ++++- .../refactoring/ExtractStyleRefactoring.java | 12 ++- .../RelativeLayoutConversionHelper.java | 10 +- .../layout/refactoring/VisualRefactoring.java | 35 +++++-- .../layout/refactoring/WrapInRefactoring.java | 11 ++- .../eclipse/adt/internal/preferences/AdtPrefs.java | 2 +- .../internal/editors/AndroidContentAssistTest.java | 55 ++++++----- .../editors/layout/refactoring/AdtProjectTest.java | 10 +- .../refactoring/ExtractIncludeRefactoringTest.java | 24 +++++ .../layout/refactoring/RefactoringTest.java | 30 ++++++ .../testdata/animator1-expected-completion61.txt | 5 +- .../testdata/broken2-expected-completion21.txt | 3 +- .../completionvalues1-expected-completion25.txt | 3 +- .../testdata/extractstyle1-expected-extract1b.diff | 33 ++++++- .../testdata/extractstyle1-expected-extract1c.diff | 31 ++++++- .../testdata/extractstyle1-expected-extract1d.diff | 30 +++++- .../testdata/extractstyle1-expected-extract2.diff | 30 +++++- .../testdata/extractstyle1-expected-extract3.diff | 29 ++++-- .../testdata/extractstyle1-expected-extract4.diff | 32 ++++++- .../testdata/extractstyle1-expected-extract5.diff | 31 ++++++- .../testdata/extractstyle1-expected-extract8.diff | 31 ++++++- .../testdata/extractstyle2-expected-extract7.diff | 30 +++++- .../testdata/manifest-expected-completion17.txt | 1 + .../testdata/newlayout6-expected-extract6.diff | 2 +- .../testdata/newlayout6-expected-extract7.diff | 30 ++++++ .../testdata/newstyles-expected-extract1.diff | 2 +- .../testdata/newstyles2-expected-extract1b.diff | 2 +- .../testdata/newstyles3-expected-extract1c.diff | 2 +- .../testdata/newstyles3-expected-extract8.diff | 2 +- .../testdata/newstyles4-expected-extract1d.diff | 2 +- .../testdata/newstyles4-expected-extract3.diff | 2 +- .../testdata/newstyles5-expected-extract4.diff | 2 +- .../testdata/newstyles6-expected-extract5.diff | 2 +- .../testdata/newstyles8-expected-extract7.diff | 2 +- .../testdata/sample1a-expected-changeLayout1a.xml | 82 +++++++++++++++-- .../testdata/sample1a-expected-extract7.diff | 86 +++++++++++++++++ .../testdata/sample1b-expected-changeLayout1b.xml | 102 +++++++++++++-------- .../testdata/sample2-expected-changeLayout2.xml | 67 ++++++++++++-- .../testdata/sample3-expected-changeLayout3.xml | 41 ++++++++- .../testdata/sample3-expected-wrapIn1.xml | 37 ++++++-- .../testdata/sample3-expected-wrapIn2.xml | 40 ++++++-- .../testdata/sample3-expected-wrapIn3.xml | 37 ++++++-- .../testdata/sample4-expected-changeLayout4.xml | 28 +++++- .../testdata/sample5-expected-changeLayout5.xml | 76 +++++++++++++-- .../testdata/sample6-expected-changeLayout6.xml | 40 +++++++- .../testdata/sample7-expected-extract7.diff | 70 ++++++++++++++ .../testdata/sample8-expected-extract7.diff | 95 +++++++++++++++++++ 49 files changed, 1200 insertions(+), 178 deletions(-) create mode 100644 eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newlayout6-expected-extract7.diff create mode 100644 eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1a-expected-extract7.diff create mode 100644 eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample7-expected-extract7.diff create mode 100644 eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample8-expected-extract7.diff diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeLayoutRefactoring.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeLayoutRefactoring.java index fc3b21f7c..4f14bb925 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeLayoutRefactoring.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeLayoutRefactoring.java @@ -35,11 +35,13 @@ import static com.android.ide.eclipse.adt.AdtConstants.EXT_XML; import com.android.annotations.VisibleForTesting; import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor; +import com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatStyle; import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor; import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.LayoutCanvas; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.ViewHierarchy; +import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; @@ -204,7 +206,6 @@ public class ChangeLayoutRefactoring extends VisualRefactoring { List changes = new ArrayList(); TextFileChange change = new TextFileChange(file.getName(), file); MultiTextEdit rootEdit = new MultiTextEdit(); - change.setEdit(rootEdit); change.setTextType(EXT_XML); changes.add(change); @@ -269,6 +270,14 @@ public class ChangeLayoutRefactoring extends VisualRefactoring { removeUndefinedLayoutAttrs(rootEdit, layout); } + if (AdtPrefs.getPrefs().getFormatGuiXml()) { + MultiTextEdit formatted = reformat(rootEdit, XmlFormatStyle.LAYOUT); + if (formatted != null) { + rootEdit = formatted; + } + } + change.setEdit(rootEdit); + return changes; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeViewRefactoring.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeViewRefactoring.java index 2e92e48c6..b70a15ff0 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeViewRefactoring.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ChangeViewRefactoring.java @@ -43,6 +43,7 @@ import org.eclipse.text.edits.TextEdit; import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel; import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion; import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; +import org.eclipse.wst.xml.core.internal.document.ElementImpl; import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; @@ -163,15 +164,19 @@ public class ChangeViewRefactoring extends VisualRefactoring { String oldName = element.getNodeName(); int open = text.indexOf(oldName); int close = text.lastIndexOf(oldName); + if (element instanceof ElementImpl && ((ElementImpl) element).isEmptyTag()) { + close = -1; + } - if (open != -1 && close != -1) { + if (open != -1) { int oldLength = oldName.length(); rootEdit.addChild(new ReplaceEdit(region.getStartOffset() + open, oldLength, name)); - if (close != open) { // Gracefully handle - rootEdit.addChild(new ReplaceEdit(region.getStartOffset() + close, oldLength, - name)); - } + } + if (close != -1 && close != open) { + int oldLength = oldName.length(); + rootEdit.addChild(new ReplaceEdit(region.getStartOffset() + close, oldLength, + name)); } // Change tag type diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoring.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoring.java index 7def20511..4f9a6ba5f 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoring.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoring.java @@ -37,11 +37,15 @@ import com.android.AndroidConstants; import com.android.annotations.VisibleForTesting; import com.android.ide.eclipse.adt.AdtConstants; import com.android.ide.eclipse.adt.AdtPlugin; +import com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatPreferences; +import com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatStyle; +import com.android.ide.eclipse.adt.internal.editors.formatting.XmlPrettyPrinter; import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor; import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities; import com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode; +import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; import com.android.ide.eclipse.adt.internal.resources.ResourceNameValidator; import com.android.sdklib.SdkConstants; @@ -316,7 +320,13 @@ public class ExtractIncludeRefactoring extends VisualRefactoring { TextFileChange addFile = new TextFileChange("Create new separate layout", file); addFile.setTextType(AdtConstants.EXT_XML); changes.add(addFile); - addFile.setEdit(new InsertEdit(0, sb.toString())); + + String newFile = sb.toString(); + if (AdtPrefs.getPrefs().getFormatGuiXml()) { + newFile = XmlPrettyPrinter.prettyPrint(newFile, + XmlFormatPreferences.create(), XmlFormatStyle.LAYOUT, null /*lineSeparator*/); + } + addFile.setEdit(new InsertEdit(0, newFile)); Change finishHook = createFinishHook(file); changes.add(finishHook); @@ -328,7 +338,6 @@ public class ExtractIncludeRefactoring extends VisualRefactoring { IFile sourceFile, int begin, int end, Document document, Element primary) { TextFileChange change = new TextFileChange(sourceFile.getName(), sourceFile); MultiTextEdit rootEdit = new MultiTextEdit(); - change.setEdit(rootEdit); change.setTextType(EXT_XML); changes.add(change); @@ -353,6 +362,14 @@ public class ExtractIncludeRefactoring extends VisualRefactoring { for (TextEdit edit : replaceIds) { rootEdit.addChild(edit); } + + if (AdtPrefs.getPrefs().getFormatGuiXml()) { + MultiTextEdit formatted = reformat(doc.get(), rootEdit, + XmlFormatStyle.LAYOUT); + if (formatted != null) { + rootEdit = formatted; + } + } } } catch (IOException e) { AdtPlugin.log(e, null); @@ -364,6 +381,8 @@ public class ExtractIncludeRefactoring extends VisualRefactoring { } } } + + change.setEdit(rootEdit); } /** diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractStyleRefactoring.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractStyleRefactoring.java index d8dfe8636..1fc26b500 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractStyleRefactoring.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractStyleRefactoring.java @@ -42,7 +42,9 @@ import com.android.ide.common.resources.ResourceResolver; import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor; import com.android.ide.eclipse.adt.internal.editors.descriptors.DescriptorsUtils; +import com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatStyle; import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor; +import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; import com.android.ide.eclipse.adt.internal.wizards.newxmlfile.NewXmlFileWizard; import com.android.util.Pair; @@ -350,9 +352,17 @@ public class ExtractStyleRefactoring extends VisualRefactoring { if (rootEdit.hasChildren()) { IFile sourceFile = mEditor.getInputFile(); TextFileChange change = new TextFileChange(sourceFile.getName(), sourceFile); - change.setEdit(rootEdit); change.setTextType(EXT_XML); changes.add(change); + + if (AdtPrefs.getPrefs().getFormatGuiXml()) { + MultiTextEdit formatted = reformat(rootEdit, XmlFormatStyle.LAYOUT); + if (formatted != null) { + rootEdit = formatted; + } + } + + change.setEdit(rootEdit); } return changes; diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RelativeLayoutConversionHelper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RelativeLayoutConversionHelper.java index c9cb32cc5..da2bb2bc1 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RelativeLayoutConversionHelper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RelativeLayoutConversionHelper.java @@ -66,6 +66,7 @@ import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities; +import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; import com.android.util.Pair; import org.eclipse.core.runtime.IStatus; @@ -119,6 +120,10 @@ class RelativeLayoutConversionHelper { /** Performs conversion from any layout to a RelativeLayout */ public void convertToRelative() { + if (mRootView == null) { + return; + } + // Locate the view for the layout CanvasViewInfo layoutView = findViewForElement(mRootView, mLayout); if (layoutView == null || layoutView.getChildren().size() == 0) { @@ -208,7 +213,7 @@ class RelativeLayoutConversionHelper { if (mFlatten && delete.size() > 0) { for (Element element : delete) { mRefactoring.removeElementTags(mRootEdit, element, delete, - true /*changeIndentation*/); + !AdtPrefs.getPrefs().getFormatGuiXml() /*changeIndentation*/); } } } @@ -558,7 +563,8 @@ class RelativeLayoutConversionHelper { } } - if (baselineRef != null && !baselineRef.getId().equals(childView.getId())) { + if (baselineRef != null && baselineRef.getId() != null + && !baselineRef.getId().equals(childView.getId())) { assert !isVertical; // Only align if they share the same gravity if ((childView.getGravity() & GRAVITY_VERT_MASK) == diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/VisualRefactoring.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/VisualRefactoring.java index b7ed71ea8..dd242c8c0 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/VisualRefactoring.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/VisualRefactoring.java @@ -701,6 +701,12 @@ public abstract class VisualRefactoring extends Refactoring { mSelectionStart = getRegion(first).getStartOffset(); mSelectionEnd = getRegion(last).getEndOffset(); + if (mSelectionStart > mSelectionEnd) { + int tmp = mSelectionStart; + mSelectionStart = mSelectionEnd; + mSelectionEnd = tmp; + } + if (first == last) { nodes.add(first); } else if (first.getParentNode() == last.getParentNode()) { @@ -845,7 +851,8 @@ public abstract class VisualRefactoring extends Refactoring { } String oldTypeBase = oldType.substring(oldType.lastIndexOf('.') + 1); String id = getId(element); - if (id == null || id.toLowerCase().contains(oldTypeBase.toLowerCase())) { + if (id == null || id.length() == 0 + || id.toLowerCase().contains(oldTypeBase.toLowerCase())) { String newTypeBase = newType.substring(newType.lastIndexOf('.') + 1); return ensureHasId(rootEdit, element, newTypeBase); } @@ -1235,9 +1242,25 @@ public abstract class VisualRefactoring extends Refactoring { * applied, but the resulting range is also formatted */ protected MultiTextEdit reformat(MultiTextEdit edit, XmlFormatStyle style) { - IDocument document = new org.eclipse.jface.text.Document(); String xml = mEditor.getStructuredDocument().get(); - document.set(xml); + return reformat(xml, edit, style); + } + + /** + * Rewrite the edits in the given {@link MultiTextEdit} such that same edits are + * applied, but the resulting range is also formatted + * + * @param oldContents the original contents that should be edited by a + * {@link MultiTextEdit} + * @param edit the {@link MultiTextEdit} to be applied to some string + * @param style the formatting style to use + * @return a new {@link MultiTextEdit} which performs the same edits as the input edit + * but also reformats the text + */ + public static MultiTextEdit reformat(String oldContents, MultiTextEdit edit, + XmlFormatStyle style) { + IDocument document = new org.eclipse.jface.text.Document(); + document.set(oldContents); try { edit.apply(document); @@ -1272,10 +1295,10 @@ public abstract class VisualRefactoring extends Refactoring { int firstDifference = 0; int lastDifference = formatted.length(); int start = 0; - int end = xml.length(); + int end = oldContents.length(); for (int i = 0, j = start; i < formatted.length() && j < end; i++, j++) { - if (formatted.charAt(i) != xml.charAt(j)) { + if (formatted.charAt(i) != oldContents.charAt(j)) { firstDifference = i; foundDifference = true; break; @@ -1291,7 +1314,7 @@ public abstract class VisualRefactoring extends Refactoring { for (int i = formatted.length() - 1, j = end - 1; i > firstDifference && j > start; i--, j--) { - if (formatted.charAt(i) != xml.charAt(j)) { + if (formatted.charAt(i) != oldContents.charAt(j)) { lastDifference = i + 1; break; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/WrapInRefactoring.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/WrapInRefactoring.java index 7a3744bba..9cb1d26b3 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/WrapInRefactoring.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/WrapInRefactoring.java @@ -28,8 +28,10 @@ import static com.android.ide.eclipse.adt.AdtConstants.EXT_XML; import com.android.annotations.VisibleForTesting; import com.android.ide.eclipse.adt.internal.editors.AndroidXmlEditor; +import com.android.ide.eclipse.adt.internal.editors.formatting.XmlFormatStyle; import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo; +import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; @@ -199,7 +201,6 @@ public class WrapInRefactoring extends VisualRefactoring { List changes = new ArrayList(); TextFileChange change = new TextFileChange(file.getName(), file); MultiTextEdit rootEdit = new MultiTextEdit(); - change.setEdit(rootEdit); change.setTextType(EXT_XML); String id = ensureNewId(mId); @@ -386,6 +387,14 @@ public class WrapInRefactoring extends VisualRefactoring { InsertEdit endEdit = new InsertEdit(mSelectionEnd, sb.toString()); rootEdit.addChild(endEdit); + if (AdtPrefs.getPrefs().getFormatGuiXml()) { + MultiTextEdit formatted = reformat(rootEdit, XmlFormatStyle.LAYOUT); + if (formatted != null) { + rootEdit = formatted; + } + } + + change.setEdit(rootEdit); changes.add(change); return changes; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/AdtPrefs.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/AdtPrefs.java index 287b1c38a..095c67a2c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/AdtPrefs.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/AdtPrefs.java @@ -381,7 +381,7 @@ public final class AdtPrefs extends AbstractPreferenceInitializer { store.setDefault(PREFS_HOME_PACKAGE, "android.process.acore"); //$NON-NLS-1$ store.setDefault(PREFS_MONITOR_DENSITY, 0.f); - store.setDefault(PREFS_FORMAT_GUI_XML, false); + store.setDefault(PREFS_FORMAT_GUI_XML, true); store.setDefault(PREFS_USE_CUSTOM_XML_FORMATTER, true); store.setDefault(PREFS_ONE_ATTR_PER_LINE, true); store.setDefault(PREFS_SPACE_BEFORE_CLOSE, true); diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssistTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssistTest.java index 4eb54cd5f..8590b89d4 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssistTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssistTest.java @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.android.ide.eclipse.adt.internal.editors; import static com.android.AndroidConstants.FD_RES_ANIM; @@ -24,11 +25,16 @@ import static com.android.sdklib.SdkConstants.FD_RES; import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.internal.editors.animator.AnimationContentAssist; +import com.android.ide.eclipse.adt.internal.editors.animator.AnimationEditor; import com.android.ide.eclipse.adt.internal.editors.color.ColorContentAssist; +import com.android.ide.eclipse.adt.internal.editors.color.ColorEditor; import com.android.ide.eclipse.adt.internal.editors.drawable.DrawableContentAssist; +import com.android.ide.eclipse.adt.internal.editors.drawable.DrawableEditor; import com.android.ide.eclipse.adt.internal.editors.layout.LayoutContentAssist; +import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor; import com.android.ide.eclipse.adt.internal.editors.layout.refactoring.AdtProjectTest; import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestContentAssist; +import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestEditor; import com.android.ide.eclipse.adt.internal.editors.resources.ResourcesContentAssist; import org.eclipse.core.resources.IFile; @@ -45,6 +51,11 @@ import org.eclipse.ui.ide.IDE; public class AndroidContentAssistTest extends AdtProjectTest { private static final String CARET = "^"; //$NON-NLS-1$ + @Override + protected boolean testCaseNeedsUniqueProject() { + return true; + } + public void testStartsWith() { assertTrue(AndroidContentAssist.startsWith("", "")); assertTrue(AndroidContentAssist.startsWith("a", "")); @@ -740,42 +751,43 @@ public class AndroidContentAssistTest extends AdtProjectTest { // --- Code Completion test infrastructure ---- private void checkLayoutCompletion(String name, String caretLocation) throws Exception { - checkCompletion(name, getLayoutFile(getProject(), name), caretLocation, + IFile file = getLayoutFile(getProject(), name); + IDE.setDefaultEditor(file, LayoutEditor.ID); + checkCompletion(name, file, caretLocation, new LayoutContentAssist()); } private void checkColorCompletion(String name, String caretLocation) throws Exception { - IFile file = getTestDataFile(getProject(), name, - FD_RES + "/" + FD_RES_COLOR + "/" + name); - checkCompletion(name, file, caretLocation, - new ColorContentAssist()); + IFile file = getTestDataFile(getProject(), name, FD_RES + "/" + FD_RES_COLOR + "/" + name); + IDE.setDefaultEditor(file, ColorEditor.ID); + checkCompletion(name, file, caretLocation, new ColorContentAssist()); } + private void checkAnimCompletion(String name, String caretLocation) throws Exception { - IFile file = getTestDataFile(getProject(), name, - FD_RES + "/" + FD_RES_ANIM + "/" + name); - checkCompletion(name, file, caretLocation, - new AnimationContentAssist()); + IFile file = getTestDataFile(getProject(), name, FD_RES + "/" + FD_RES_ANIM + "/" + name); + IDE.setDefaultEditor(file, AnimationEditor.ID); + checkCompletion(name, file, caretLocation, new AnimationContentAssist()); } private void checkAnimatorCompletion(String name, String caretLocation) throws Exception { - IFile file = getTestDataFile(getProject(), name, - FD_RES + "/" + FD_RES_ANIMATOR + "/" + name); - checkCompletion(name, file, caretLocation, - new AnimationContentAssist()); + IFile file = getTestDataFile(getProject(), name, FD_RES + "/" + FD_RES_ANIMATOR + "/" + + name); + IDE.setDefaultEditor(file, AnimationEditor.ID); + checkCompletion(name, file, caretLocation, new AnimationContentAssist()); } - private void checkDrawableCompletion(String name, String caretLocation) throws Exception { - IFile file = getTestDataFile(getProject(), name, - FD_RES + "/" + FD_RES_DRAWABLE + "/" + name); - checkCompletion(name, file, caretLocation, - new DrawableContentAssist()); + IFile file = getTestDataFile(getProject(), name, FD_RES + "/" + FD_RES_DRAWABLE + "/" + + name); + IDE.setDefaultEditor(file, DrawableEditor.ID); + checkCompletion(name, file, caretLocation, new DrawableContentAssist()); } private void checkManifestCompletion(String name, String caretLocation) throws Exception { // Manifest files must be named AndroidManifest.xml. Must overwrite to replace // the default manifest created in the test project. IFile file = getTestDataFile(getProject(), name, "AndroidManifest.xml", true); + IDE.setDefaultEditor(file, ManifestEditor.ID); checkCompletion(name, file, caretLocation, new ManifestContentAssist()); @@ -855,18 +867,19 @@ public class AndroidContentAssistTest extends AdtProjectTest { assertTrue(diff + " versus " + actual, diff.length() > 0 || beforeWithCaret.equals(actual)); StringBuilder summary = new StringBuilder(); - summary.append("Code completion in " + basename + " for " + caretLocation + " selecting " + match + ":\n"); + summary.append("Code completion in " + basename + " for " + caretLocation + " selecting " + + match + ":\n"); if (diff.length() == 0) { diff = "No changes"; } summary.append(diff); - //assertEqualsGolden(basename, actual); + // assertEqualsGolden(basename, actual); assertEqualsGolden(basename, summary.toString(), "diff"); } private void checkCompletion(String basename, IFile file, String caretLocation, - AndroidContentAssist assist) throws Exception { + AndroidContentAssist assist) throws Exception { ICompletionProposal[] proposals = complete(file, caretLocation, assist); StringBuilder sb = new StringBuilder(1000); sb.append("Code completion in " + basename + " for " + caretLocation + ":\n"); diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/AdtProjectTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/AdtProjectTest.java index 013a6a085..efa03c80b 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/AdtProjectTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/AdtProjectTest.java @@ -417,7 +417,10 @@ public class AdtProjectTest extends SdkTestCase { sb.append('\n'); } for (int i = firstDelta; i < beforeLines.length - lastDelta; i++) { - sb.append("< "); + sb.append("<"); + if (beforeLines[i].length() > 0) { + sb.append(" "); + } sb.append(beforeLines[i]); sb.append('\n'); } @@ -435,7 +438,10 @@ public class AdtProjectTest extends SdkTestCase { sb.append('\n'); } for (int i = firstDelta; i < afterLines.length - lastDelta; i++) { - sb.append("> "); + sb.append(">"); + if (afterLines[i].length() > 0) { + sb.append(" "); + } sb.append(afterLines[i]); sb.append('\n'); } diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoringTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoringTest.java index da2a89058..d2e10731f 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoringTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/ExtractIncludeRefactoringTest.java @@ -17,9 +17,13 @@ package com.android.ide.eclipse.adt.internal.editors.layout.refactoring; import static com.android.ide.eclipse.adt.AdtConstants.DOT_XML; +import com.android.ide.eclipse.adt.AdtPlugin; +import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; + import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ltk.core.refactoring.Change; import org.eclipse.ltk.core.refactoring.TextFileChange; import org.w3c.dom.Element; @@ -29,6 +33,12 @@ import java.util.List; import java.util.Map; public class ExtractIncludeRefactoringTest extends RefactoringTest { + + @Override + protected boolean autoFormat() { + return false; + } + @Override protected boolean testCaseNeedsUniqueProject() { // Because some of these tests look at ALL layouts in the project @@ -105,6 +115,20 @@ public class ExtractIncludeRefactoringTest extends RefactoringTest { "@+id/linearLayout4"); } + public void testExtract7() throws Exception { + // Just like testExtract6, except we turn on auto-formatting + IPreferenceStore store = AdtPlugin.getDefault().getPreferenceStore(); + AdtPrefs.init(store); + AdtPrefs prefs = AdtPrefs.getPrefs(); + prefs.initializeStoreWithDefaults(store); + store.setValue(AdtPrefs.PREFS_FORMAT_GUI_XML, true); + prefs.loadValues(null); + + assertTrue(AdtPrefs.getPrefs().getFormatGuiXml()); + + testExtract6(); + } + private void checkRefactoring(String basename, String layoutName, boolean replaceOccurrences, Map extraFiles, diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RefactoringTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RefactoringTest.java index 4ca30d654..c525e30b0 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RefactoringTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/RefactoringTest.java @@ -19,13 +19,16 @@ import static com.android.ide.common.layout.LayoutConstants.ANDROID_WIDGET_PREFI import static com.android.ide.eclipse.adt.AdtConstants.DOT_XML; import com.android.ide.common.rendering.api.ViewInfo; +import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.CanvasViewInfo; import com.android.ide.eclipse.adt.internal.editors.layout.gle2.DomUtilities; import com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode; import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode; +import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IPath; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.Document; import org.eclipse.jface.text.IDocument; @@ -53,6 +56,27 @@ import java.util.regex.Pattern; @SuppressWarnings("restriction") public class RefactoringTest extends AdtProjectTest { + protected boolean autoFormat() { + return true; + } + + @Override + protected void setUp() throws Exception { + + // Ensure that the defaults are initialized so for example formatting options are + // initialized properly + IPreferenceStore store = AdtPlugin.getDefault().getPreferenceStore(); + AdtPrefs.init(store); + AdtPrefs prefs = AdtPrefs.getPrefs(); + prefs.initializeStoreWithDefaults(store); + + store.setValue(AdtPrefs.PREFS_FORMAT_GUI_XML, autoFormat()); + + prefs.loadValues(null); + + super.setUp(); + } + protected static Element findElementById(Element root, String id) { if (id.equals(VisualRefactoring.getId(root))) { return root; @@ -104,6 +128,12 @@ public class RefactoringTest extends AdtProjectTest { } String actual = document.get(); + + // Ensure that the document is still valid to make sure the edits don't + // mangle it: + org.w3c.dom.Document doc = DomUtilities.parseDocument(actual, true); + assertNotNull(actual, doc); + assertEqualsGolden(basename, actual); } diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/animator1-expected-completion61.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/animator1-expected-completion61.txt index d4618c2cc..9ac8a52ea 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/animator1-expected-completion61.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/animator1-expected-completion61.txt @@ -9,10 +9,9 @@ Code completion in animator1.xml for android:interpolator="^@android:anim/bounce @android:anim/linear_interpolator @android:anim/cycle_interpolator @android: -@anim/ -@animator/ -@color/ +@+id/ @drawable/ +@id/ @layout/ @string/ @style/ diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/broken2-expected-completion21.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/broken2-expected-completion21.txt index 9b7d00142..1ee2585cd 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/broken2-expected-completion21.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/broken2-expected-completion21.txt @@ -1,6 +1,7 @@ Code completion in broken2.xml for style=^: -"@style/" "@android:" +"@+id/" "@drawable/" +"@id/" "@layout/" "@string/" diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion25.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion25.txt index 06f5a99e1..538854110 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion25.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion25.txt @@ -1,6 +1,7 @@ Code completion in completionvalues1.xml for textColor">^@color/title_color: @android: +@+id/ @drawable/ +@id/ @layout/ @string/ -@style/ diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1b.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1b.diff index d734ccf59..95d078c6e 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1b.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1b.diff @@ -1,3 +1,34 @@ +< android:layout_width="wrap_content" android:layout_height="match_parent"> < +< --- -> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1c.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1c.diff index 2ebc91d08..3c3d47fcd 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1c.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1c.diff @@ -1,4 +1,31 @@ - android:layout_width="wrap_content" android:layout_height="fill_parent" +< android:layout_width="wrap_content" android:layout_height="match_parent"> +< +< --- +> android:layout_width="wrap_content" +> android:layout_height="match_parent" > +> +> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1d.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1d.diff index ec560b37b..33ff9dbb7 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1d.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract1d.diff @@ -1,6 +1,32 @@ +< android:layout_width="wrap_content" android:layout_height="match_parent"> +< < --- -> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract2.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract2.diff index ec560b37b..33ff9dbb7 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract2.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract2.diff @@ -1,6 +1,32 @@ +< android:layout_width="wrap_content" android:layout_height="match_parent"> +< < --- -> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract3.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract3.diff index f7fd22b17..e4d3412b8 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract3.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract3.diff @@ -1,3 +1,4 @@ +< android:layout_width="wrap_content" android:layout_height="match_parent"> < --- -> -> +> android:layout_width="wrap_content" +> android:layout_height="match_parent" > +> +> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract4.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract4.diff index a8e2af491..9094011e0 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract4.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract4.diff @@ -1,7 +1,33 @@ +< android:layout_width="wrap_content" android:layout_height="match_parent"> +< < --- -> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract5.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract5.diff index bcaff2ac9..c7cdba6cd 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract5.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract5.diff @@ -1,8 +1,33 @@ +< android:layout_width="wrap_content" android:layout_height="match_parent"> < +< --- -> +> android:layout_width="wrap_content" +> android:layout_height="match_parent" > +> +> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract8.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract8.diff index 2ebc91d08..3c3d47fcd 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract8.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle1-expected-extract8.diff @@ -1,4 +1,31 @@ - android:layout_width="wrap_content" android:layout_height="fill_parent" +< android:layout_width="wrap_content" android:layout_height="match_parent"> +< +< --- +> android:layout_width="wrap_content" +> android:layout_height="match_parent" > +> +> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle2-expected-extract7.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle2-expected-extract7.diff index 84c2ad7c7..a4dd387f9 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle2-expected-extract7.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/extractstyle2-expected-extract7.diff @@ -1,3 +1,4 @@ +< foo:layout_width="wrap_content" foo:layout_height="match_parent" foo:orientation="vertical"> < --- -> -> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/manifest-expected-completion17.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/manifest-expected-completion17.txt index 815d39390..8244f0a81 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/manifest-expected-completion17.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/manifest-expected-completion17.txt @@ -1,4 +1,5 @@ Code completion in manifest.xml for ^android:versionCode="1": +xmlns:android package : This attribute gives a unique name for the package, using a Java-style naming convention to avoid name collisions. For example, applications published by Google could have names of the form com.google.app.appname android:versionCode : Internal version code. [integer] android:versionName : The text shown to the user to indicate the version they have. [string] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newlayout6-expected-extract6.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newlayout6-expected-extract6.diff index 3a4c5909d..1958ae568 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newlayout6-expected-extract6.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newlayout6-expected-extract6.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newlayout6-expected-extract7.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newlayout6-expected-extract7.diff new file mode 100644 index 000000000..871a14dab --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newlayout6-expected-extract7.diff @@ -0,0 +1,30 @@ +< +--- +> +> android:id="@+id/linearLayout4" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" > +> +> android:id="@+id/linearLayout5" +> android:layout_width="wrap_content" +> android:layout_height="match_parent" > +> +> android:id="@+id/linearLayout6" +> android:layout_width="wrap_content" +> android:layout_height="match_parent" > +> +> +> +> +> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles-expected-extract1.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles-expected-extract1.diff index d83eb49d3..7f076e71a 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles-expected-extract1.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles-expected-extract1.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles2-expected-extract1b.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles2-expected-extract1b.diff index d83eb49d3..7f076e71a 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles2-expected-extract1b.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles2-expected-extract1b.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles3-expected-extract1c.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles3-expected-extract1c.diff index d83eb49d3..7f076e71a 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles3-expected-extract1c.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles3-expected-extract1c.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles3-expected-extract8.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles3-expected-extract8.diff index 3b4d930ce..01d06976f 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles3-expected-extract8.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles3-expected-extract8.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles4-expected-extract1d.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles4-expected-extract1d.diff index d83eb49d3..7f076e71a 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles4-expected-extract1d.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles4-expected-extract1d.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles4-expected-extract3.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles4-expected-extract3.diff index 0685d947f..8f2e543db 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles4-expected-extract3.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles4-expected-extract3.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles5-expected-extract4.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles5-expected-extract4.diff index f052485cb..3013eb5d1 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles5-expected-extract4.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles5-expected-extract4.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles6-expected-extract5.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles6-expected-extract5.diff index ce1d4aaea..7980faed0 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles6-expected-extract5.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles6-expected-extract5.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles8-expected-extract7.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles8-expected-extract7.diff index 8f7ad98de..9e4ee25ca 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles8-expected-extract7.diff +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/newstyles8-expected-extract7.diff @@ -1,4 +1,4 @@ -< +< --- > > diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1a-expected-changeLayout1a.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1a-expected-changeLayout1a.xml index 772f82a16..d03c92535 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1a-expected-changeLayout1a.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1a-expected-changeLayout1a.xml @@ -1,11 +1,75 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1a-expected-extract7.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1a-expected-extract7.diff new file mode 100644 index 000000000..0a0b80930 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1a-expected-extract7.diff @@ -0,0 +1,86 @@ +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +--- +> android:id="@+id/LinearLayout2" +> android:layout_width="match_parent" +> android:layout_height="match_parent" +> android:orientation="vertical" > +> +> +> +> android:id="@+id/linearLayout1" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" > +> +> +> +> +> +> android:id="@+id/checkBox1" +> android:layout_width="wrap_content" +> android:layout_height="wrap_content" +> android:text="CheckBox" > +> +> +> +> +> +> android:id="@+id/linearLayout3" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" > +> +> +> +> +> android:id="@+id/linearLayout4_ref" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" +> layout="@layout/newlayout6" /> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1b-expected-changeLayout1b.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1b-expected-changeLayout1b.xml index f47e9bea0..d03c92535 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1b-expected-changeLayout1b.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample1b-expected-changeLayout1b.xml @@ -1,45 +1,75 @@ - - - - - - + + + + + + + + + - - - + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_below="@+id/checkBox1" + android:text="FourthButton" > + + + + + + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample2-expected-changeLayout2.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample2-expected-changeLayout2.xml index cce3803fc..06420c483 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample2-expected-changeLayout2.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample2-expected-changeLayout2.xml @@ -1,11 +1,62 @@ - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-changeLayout3.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-changeLayout3.xml index c5118b661..268688b83 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-changeLayout3.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-changeLayout3.xml @@ -1,7 +1,38 @@ - - - - - + + + + + + + + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn1.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn1.xml index 5af18d67b..097f87046 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn1.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn1.xml @@ -1,11 +1,36 @@ - - - + + + + + + - + android:layout_height="wrap_content" > + + - + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn2.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn2.xml index 5d5fbfc83..2921e40e7 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn2.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn2.xml @@ -1,12 +1,36 @@ - - - - - + android:layout_height="match_parent" > + + + + + + + + - + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn3.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn3.xml index efbeb1855..6b57216a6 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn3.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample3-expected-wrapIn3.xml @@ -1,11 +1,36 @@ - - + + + + - - + android:layout_height="wrap_content" > + + + + - + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample4-expected-changeLayout4.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample4-expected-changeLayout4.xml index 2dd7ab70a..6e5552950 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample4-expected-changeLayout4.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample4-expected-changeLayout4.xml @@ -1,6 +1,26 @@ - - - - + + + + + + + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample5-expected-changeLayout5.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample5-expected-changeLayout5.xml index 225476c58..06b236dfb 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample5-expected-changeLayout5.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample5-expected-changeLayout5.xml @@ -1,10 +1,70 @@ - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample6-expected-changeLayout6.xml b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample6-expected-changeLayout6.xml index 045d2ce3f..a91ad1e7b 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample6-expected-changeLayout6.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample6-expected-changeLayout6.xml @@ -1,7 +1,37 @@ - - - - - + + + + + + + + + \ No newline at end of file diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample7-expected-extract7.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample7-expected-extract7.diff new file mode 100644 index 000000000..96e6dfb91 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample7-expected-extract7.diff @@ -0,0 +1,70 @@ +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +--- +> android:id="@+id/LinearLayout2" +> android:layout_width="match_parent" +> android:layout_height="match_parent" +> android:orientation="vertical" > +> +> +> +> android:id="@+id/linearLayout4_ref" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" +> layout="@layout/newlayout6" /> +> +> android:id="@+id/linearLayout9" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" > +> +> +> +> +> +> android:id="@+id/checkBox1" +> android:layout_width="wrap_content" +> android:layout_height="wrap_content" +> android:text="CheckBox" > +> +> +> +> +> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample8-expected-extract7.diff b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample8-expected-extract7.diff new file mode 100644 index 000000000..17749687c --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/sample8-expected-extract7.diff @@ -0,0 +1,95 @@ +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +< +--- +> android:id="@+id/LinearLayout2" +> android:layout_width="match_parent" +> android:layout_height="match_parent" +> android:orientation="vertical" > +> +> +> +> android:id="@+id/outer" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" > +> +> android:id="@+id/linearLayout4_ref" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" +> layout="@layout/newlayout6" /> +> +> +> android:id="@+id/outer" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" > +> +> android:id="@+id/linearLayout4" +> android:layout_width="match_parent" +> android:layout_height="wrap_content" > +> +> android:id="@+id/linearLayout5" +> android:layout_width="wrap_content" +> android:layout_height="match_parent" > +> +> android:id="@+id/linearLayout6" +> android:layout_width="wrap_content" +> android:layout_height="match_parent" > +> +> +> +> +> +> +> -- 2.11.0