diff options
16 files changed, 148 insertions, 34 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssist.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssist.java index b39c4cb..09bd627 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssist.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssist.java @@ -16,7 +16,9 @@ package com.android.ide.eclipse.adt.internal.editors; +import static com.android.SdkConstants.ANDROID_URI; import static com.android.SdkConstants.ATTR_LAYOUT_RESOURCE_PREFIX; +import static com.android.SdkConstants.PREFIX_ANDROID; import static com.android.SdkConstants.PREFIX_RESOURCE_REF; import static com.android.SdkConstants.UNIT_DP; import static com.android.SdkConstants.UNIT_IN; @@ -549,6 +551,7 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor { } Map<String, String> nsUriMap = new HashMap<String, String>(); + boolean haveLayoutParams = false; for (Object choice : choices) { String keyword = null; @@ -646,6 +649,11 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor { cursorPosition++; } + if (nsPrefix != null && + keyword.startsWith(ATTR_LAYOUT_RESOURCE_PREFIX, nsPrefix.length())) { + haveLayoutParams = true; + } + // For attributes, automatically insert ns:attribute="" and place the cursor // inside the quotes. // Special case for attributes: insert ="" stuff and locate caret inside "" @@ -663,6 +671,36 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor { )); } } + + if (wordPrefix.length() > 0 && haveLayoutParams + && !wordPrefix.startsWith(ATTR_LAYOUT_RESOURCE_PREFIX)) { + // Sort layout parameters to the front if we automatically inserted some + // that you didn't request. For example, you typed "width" and we match both + // "width" and "layout_width" - should match layout_width. + String nsPrefix = nsUriMap.get(ANDROID_URI); + if (nsPrefix == null) { + nsPrefix = PREFIX_ANDROID; + } else { + nsPrefix += ':'; + } + if (!(wordPrefix.startsWith(nsPrefix) + && wordPrefix.startsWith(ATTR_LAYOUT_RESOURCE_PREFIX, nsPrefix.length()))) { + int nextLayoutIndex = 0; + for (int i = 0, n = proposals.size(); i < n; i++) { + ICompletionProposal proposal = proposals.get(i); + String keyword = proposal.getDisplayString(); + if (keyword.startsWith(nsPrefix) && + keyword.startsWith(ATTR_LAYOUT_RESOURCE_PREFIX, nsPrefix.length()) + && i != nextLayoutIndex) { + // Swap to front + ICompletionProposal temp = proposals.get(nextLayoutIndex); + proposals.set(nextLayoutIndex, proposal); + proposals.set(i, temp); + nextLayoutIndex++; + } + } + } + } } /** diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/Hyperlinks.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/Hyperlinks.java index 3a47eb2..23846a3 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/Hyperlinks.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/Hyperlinks.java @@ -23,6 +23,7 @@ import static com.android.SdkConstants.ANDROID_THEME_PREFIX; import static com.android.SdkConstants.ANDROID_URI; import static com.android.SdkConstants.ATTR_CLASS; import static com.android.SdkConstants.ATTR_CONTEXT; +import static com.android.SdkConstants.ATTR_ID; import static com.android.SdkConstants.ATTR_NAME; import static com.android.SdkConstants.ATTR_ON_CLICK; import static com.android.SdkConstants.ATTR_REF_PREFIX; @@ -223,7 +224,7 @@ public class Hyperlinks { // It's a value -declaration-, nowhere else to jump // (though we could consider jumping to the R-file; would that // be helpful?) - return false; + return !ATTR_ID.equals(attribute.getLocalName()); } Pair<ResourceType,String> resource = parseResource(value); @@ -1002,16 +1003,25 @@ public class Hyperlinks { private static Pair<IFile, IRegion> findIdInDocument(String id, IFile file, Document document) { String targetAttribute = NEW_ID_PREFIX + id; - return findIdInElement(document.getDocumentElement(), file, targetAttribute); + Element root = document.getDocumentElement(); + Pair<IFile, IRegion> result = findIdInElement(root, file, targetAttribute, + true /*requireId*/); + if (result == null) { + result = findIdInElement(root, file, targetAttribute, false /*requireId*/); + } + return result; } private static Pair<IFile, IRegion> findIdInElement( - Element root, IFile file, String targetAttribute) { + Element root, IFile file, String targetAttribute, boolean requireIdAttribute) { NamedNodeMap attributes = root.getAttributes(); for (int i = 0, n = attributes.getLength(); i < n; i++) { Node item = attributes.item(i); if (item instanceof Attr) { - Attr attribute = (Attr)item; + Attr attribute = (Attr) item; + if (requireIdAttribute && !ATTR_ID.equals(attribute.getLocalName())) { + continue; + } String value = attribute.getValue(); if (value.equals(targetAttribute)) { // Select the element -containing- the id rather than the attribute itself @@ -1034,7 +1044,8 @@ public class Hyperlinks { Node child = children.item(i); if (child.getNodeType() == Node.ELEMENT_NODE) { Element element = (Element)child; - Pair<IFile, IRegion> result = findIdInElement(element, file, targetAttribute); + Pair<IFile, IRegion> result = findIdInElement(element, file, targetAttribute, + requireIdAttribute); if (result != null) { return result; } 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 47571cd..55a6b0b 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 @@ -27,11 +27,15 @@ 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.color.ColorContentAssist; import com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor; +import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor; +import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor; import com.android.ide.eclipse.adt.internal.editors.drawable.DrawableContentAssist; import com.android.ide.eclipse.adt.internal.editors.layout.LayoutContentAssist; +import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor; 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.uimodel.UiElementNode; import com.android.ide.eclipse.adt.internal.editors.values.ValuesContentAssist; import org.eclipse.core.resources.IFile; @@ -862,8 +866,17 @@ public class AndroidContentAssistTest extends AdtProjectTest { assertNotNull(page); IEditorPart editor = IDE.openEditor(page, file); assertTrue(editor instanceof AndroidXmlEditor); - AndroidXmlEditor layoutEditor = (AndroidXmlEditor) editor; - ISourceViewer viewer = layoutEditor.getStructuredSourceViewer(); + AndroidXmlEditor xmlEditor = (AndroidXmlEditor) editor; + + UiElementNode root = xmlEditor.getUiRootNode(); + ElementDescriptor descriptor = root.getDescriptor(); + if (descriptor instanceof ViewElementDescriptor) { + ViewElementDescriptor vd = (ViewElementDescriptor) descriptor; + AttributeDescriptor[] attributes = vd.getAttributes(); + assertTrue(Integer.toString(attributes.length), attributes.length > 0); + } + + ISourceViewer viewer = xmlEditor.getStructuredSourceViewer(); // Determine the offset, and possibly make text range selections as well int offset = updateCaret(viewer, caretLocation); 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 7fb9cdb..8dd83d7 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 @@ -19,16 +19,21 @@ import static com.android.SdkConstants.FD_RES; import static com.android.SdkConstants.FD_RES_LAYOUT; import static com.android.SdkConstants.FD_RES_VALUES; +import com.android.ide.common.sdk.LoadStatus; import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.AdtUtils; import com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor; import com.android.ide.eclipse.adt.internal.editors.descriptors.AttributeDescriptor; import com.android.ide.eclipse.adt.internal.editors.descriptors.ElementDescriptor; import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate; +import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors; import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor; import com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode; import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode; import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs; +import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper; +import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData; +import com.android.ide.eclipse.adt.internal.sdk.Sdk; import com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreator; import com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectWizardState; import com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectWizardState.Mode; @@ -42,6 +47,7 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Path; +import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jface.operation.IRunnableContext; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.text.source.ISourceViewer; @@ -56,11 +62,12 @@ import java.io.File; import java.io.InputStream; import java.lang.reflect.InvocationTargetException; import java.util.HashMap; +import java.util.List; import java.util.Map; @SuppressWarnings({"restriction", "javadoc"}) public abstract class AdtProjectTest extends SdkLoadingTestCase { - private static final int TARGET_API_LEVEL = 12; + private static final int TARGET_API_LEVEL = 16; public static final String TEST_PROJECT_PACKAGE = "com.android.eclipse.tests"; //$NON-NLS-1$ private static final long TESTS_START_TIME = System.currentTimeMillis(); private static final String PROJECTNAME_PREFIX = "testproject-"; @@ -100,6 +107,40 @@ public abstract class AdtProjectTest extends SdkLoadingTestCase { AdtPrefs.getPrefs().setPaletteModes("ICON_TEXT"); //$NON-NLS-1$ getProject(); + + Sdk current = Sdk.getCurrent(); + assertNotNull(current); + LoadStatus sdkStatus = AdtPlugin.getDefault().getSdkLoadStatus(); + assertSame(LoadStatus.LOADED, sdkStatus); + IAndroidTarget target = current.getTarget(getProject()); + IJavaProject javaProject = BaseProjectHelper.getJavaProject(getProject()); + assertNotNull(javaProject); + int iterations = 0; + while (true) { + if (iterations == 100) { + fail("Couldn't load target; ran out of time"); + } + LoadStatus status = current.checkAndLoadTargetData(target, javaProject); + if (status == LoadStatus.FAILED) { + fail("Couldn't load target " + target); + } + if (status != LoadStatus.LOADING) { + break; + } + Thread.sleep(250); + iterations++; + } + AndroidTargetData targetData = current.getTargetData(target); + assertNotNull(targetData); + LayoutDescriptors layoutDescriptors = targetData.getLayoutDescriptors(); + assertNotNull(layoutDescriptors); + List<ViewElementDescriptor> viewDescriptors = layoutDescriptors.getViewDescriptors(); + assertNotNull(viewDescriptors); + assertTrue(viewDescriptors.size() > 0); + List<ViewElementDescriptor> layoutParamDescriptors = + layoutDescriptors.getLayoutDescriptors(); + assertNotNull(layoutParamDescriptors); + assertTrue(layoutParamDescriptors.size() > 0); } /** Set to true if the subclass test case should use a per-instance project rather @@ -235,7 +276,6 @@ public abstract class AdtProjectTest extends SdkLoadingTestCase { } assertNotNull(target); - IRunnableContext context = new IRunnableContext() { @Override public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) 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 1ba8a62..b298ac0 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 @@ -11,7 +11,6 @@ Code completion in animator1.xml for android:interpolator="^@android:anim/bounce @android: @+id/ @anim/ -@animator/ @color/ @drawable/ @id/ diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/color1-expected-completion46b.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/color1-expected-completion46b.txt index 99ae870..def6d13 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/color1-expected-completion46b.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/color1-expected-completion46b.txt @@ -16,4 +16,5 @@ android:state_accelerated : State value for StateListDrawable, indicating that t android:state_hovered : State value for StateListDrawable, set when a pointer is hovering over the view. [boolean] android:state_drag_can_accept : State for StateListDrawable indicating that the Drawable is in a view that is capable of accepting a drop of the content currently being manipulated in a drag-and-drop operation. [boolean] android:state_drag_hovered : State for StateListDrawable indicating that a drag operation (for which the Drawable's view is a valid recipient) is currently positioned over the Drawable. [boolean] +android:state_accessibility_focused : State for StateListDrawable indicating that a View has accessibility focus. [boolean] android:color : Hexadeximal color. Required. The color is specified with an RGB value and optional alpha channel. The value always begins with a pound (#) character and then followed by the Alpha-Red-Green-Blue information in one of the following formats: * RGB * ARGB * RRGGBB * AARRGGBB diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion1-expected-completion39.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion1-expected-completion39.txt index 0f940c2..ec756c7 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion1-expected-completion39.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion1-expected-completion39.txt @@ -11,6 +11,7 @@ android:textSize : Size of the text. [dimension] android:textScaleX : Sets the horizontal scaling factor for the text. [float] android:typeface : Typeface (normal, sans, serif, monospace) for the text. [enum] android:textStyle : Style (bold, italic, bolditalic) for the text. [flag] +android:fontFamily : Font family (named by string) for the text. [string] android:textColorLink : Text color for links. [color, reference] android:cursorVisible : Makes the cursor visible (the default) or invisible. [boolean] android:maxLines : Makes the TextView be at most this many lines tall. [integer] @@ -28,9 +29,9 @@ android:minWidth : Makes the TextView be at least this many pixels wide. [dimen android:gravity : Specifies how to align the text by the view's x- and/or y-axis when the text is smaller than the view. [flag] android:scrollHorizontally : Whether the text is allowed to be wider than the view (and therefore can be scrolled horizontally). [boolean] android:password : Whether the characters of the field are displayed as password dots instead of themselves. * Deprecated: Use inputType instead. [boolean] -android:singleLine : Constrains the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines, and advances focus instead of inserting a newline when you press the enter key. * Deprecated: This attribute is deprecated and is replaced by the textMultiLine flag in the inputType attribute. Use caution when altering existing layouts, as the default value of singeLine is false (multi-line mode), but if you specify any value for inputType, the default is single-line mode. (If both singleLine and inputType attributes are found, the inputType flags will override the value of singleLine.). [boolean] -android:enabled : Specifies whether the TextView is enabled or not. * Deprecated: Use state_enabled instead. [boolean] -android:selectAllOnFocus : If the text is selectable, select it all when the view takes focus instead of moving the cursor to the start or end. [boolean] +android:singleLine : Constrains the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines, and advances focus instead of inserting a newline when you press the enter key. * Deprecated: This attribute is deprecated. Use "maxLines" instead to change the layout of a static text, and use the "textMultiLine" flag in the inputType attribute instead for editable text views (if both singleLine and inputType are supplied, the inputType flags will override the value of singleLine). [boolean] +android:enabled : Specifies whether the widget is enabled. [boolean] +android:selectAllOnFocus : If the text is selectable, select it all when the view takes focus. [boolean] android:includeFontPadding : Leave enough room for ascenders and descenders instead of using the font ascent and descent strictly. [boolean] android:maxLength : Set an input filter to constrain the text length to the specified number. [integer] android:shadowColor : Place a shadow of the specified color behind the text. [color] @@ -104,7 +105,7 @@ android:scrollbarTrackHorizontal : Defines the horizontal scrollbar track drawab android:scrollbarTrackVertical : Defines the vertical scrollbar track drawable. [reference] android:scrollbarAlwaysDrawHorizontalTrack : Defines whether the horizontal scrollbar track should always be drawn. [boolean] android:scrollbarAlwaysDrawVerticalTrack : Defines whether the vertical scrollbar track should always be drawn. [boolean] -android:fadingEdge : . * Deprecated: This attribute is deprecated and will be ignored as of API level {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH. [flag] +android:fadingEdge : This attribute is deprecated and will be ignored as of API level 14 (ICE_CREAM_SANDWICH). [flag] android:requiresFadingEdge : Defines which edges should be faded on scrolling. [flag] android:fadingEdgeLength : Defines the length of the fading edges. [dimension] android:nextFocusLeft : Defines the next view to give focus to when the next focus is FOCUS_LEFT. [reference] @@ -140,6 +141,8 @@ android:verticalScrollbarPosition : Determines which side the vertical scroll ba android:layerType : Specifies the type of layer backing this view. [enum] android:layoutDirection : Defines the direction of layout drawing. [enum] android:textDirection : Direction of the text. [integer, enum] +android:textAlignment : Alignment of the text. [integer, enum] +android:importantForAccessibility : Controls how this View is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. [integer, enum] android:layout_width : Specifies the basic width of the view. [dimension, enum] android:layout_height : Specifies the basic height of the view. [dimension, enum] android:layout_weight : [float] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion12-expected-completion75.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion12-expected-completion75.txt index 2e5a543..5ad38e6 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion12-expected-completion75.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion12-expected-completion75.txt @@ -30,7 +30,7 @@ android:scrollbarTrackHorizontal : Defines the horizontal scrollbar track drawab android:scrollbarTrackVertical : Defines the vertical scrollbar track drawable. [reference] android:scrollbarAlwaysDrawHorizontalTrack : Defines whether the horizontal scrollbar track should always be drawn. [boolean] android:scrollbarAlwaysDrawVerticalTrack : Defines whether the vertical scrollbar track should always be drawn. [boolean] -android:fadingEdge : . * Deprecated: This attribute is deprecated and will be ignored as of API level {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH. [flag] +android:fadingEdge : This attribute is deprecated and will be ignored as of API level 14 (ICE_CREAM_SANDWICH). [flag] android:requiresFadingEdge : Defines which edges should be faded on scrolling. [flag] android:fadingEdgeLength : Defines the length of the fading edges. [dimension] android:nextFocusLeft : Defines the next view to give focus to when the next focus is FOCUS_LEFT. [reference] @@ -66,6 +66,8 @@ android:verticalScrollbarPosition : Determines which side the vertical scroll ba android:layerType : Specifies the type of layer backing this view. [enum] android:layoutDirection : Defines the direction of layout drawing. [enum] android:textDirection : Direction of the text. [integer, enum] +android:textAlignment : Alignment of the text. [integer, enum] +android:importantForAccessibility : Controls how this View is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. [integer, enum] android:layout_toLeftOf : Positions the right edge of this view to the left of the given anchor view ID. [reference] android:layout_toRightOf : Positions the left edge of this view to the right of the given anchor view ID. [reference] android:layout_above : Positions the bottom edge of this view above the given anchor view ID. [reference] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion5-expected-completion40.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion5-expected-completion40.txt index 300494e..01d86ac 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion5-expected-completion40.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion5-expected-completion40.txt @@ -11,6 +11,7 @@ android:textSize : Size of the text. [dimension] android:textScaleX : Sets the horizontal scaling factor for the text. [float] android:typeface : Typeface (normal, sans, serif, monospace) for the text. [enum] android:textStyle : Style (bold, italic, bolditalic) for the text. [flag] +android:fontFamily : Font family (named by string) for the text. [string] android:textColorLink : Text color for links. [color, reference] android:cursorVisible : Makes the cursor visible (the default) or invisible. [boolean] android:maxLines : Makes the TextView be at most this many lines tall. [integer] @@ -28,9 +29,9 @@ android:minWidth : Makes the TextView be at least this many pixels wide. [dimen android:gravity : Specifies how to align the text by the view's x- and/or y-axis when the text is smaller than the view. [flag] android:scrollHorizontally : Whether the text is allowed to be wider than the view (and therefore can be scrolled horizontally). [boolean] android:password : Whether the characters of the field are displayed as password dots instead of themselves. * Deprecated: Use inputType instead. [boolean] -android:singleLine : Constrains the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines, and advances focus instead of inserting a newline when you press the enter key. * Deprecated: This attribute is deprecated and is replaced by the textMultiLine flag in the inputType attribute. Use caution when altering existing layouts, as the default value of singeLine is false (multi-line mode), but if you specify any value for inputType, the default is single-line mode. (If both singleLine and inputType attributes are found, the inputType flags will override the value of singleLine.). [boolean] -android:enabled : Specifies whether the TextView is enabled or not. * Deprecated: Use state_enabled instead. [boolean] -android:selectAllOnFocus : If the text is selectable, select it all when the view takes focus instead of moving the cursor to the start or end. [boolean] +android:singleLine : Constrains the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines, and advances focus instead of inserting a newline when you press the enter key. * Deprecated: This attribute is deprecated. Use "maxLines" instead to change the layout of a static text, and use the "textMultiLine" flag in the inputType attribute instead for editable text views (if both singleLine and inputType are supplied, the inputType flags will override the value of singleLine). [boolean] +android:enabled : Specifies whether the widget is enabled. [boolean] +android:selectAllOnFocus : If the text is selectable, select it all when the view takes focus. [boolean] android:includeFontPadding : Leave enough room for ascenders and descenders instead of using the font ascent and descent strictly. [boolean] android:maxLength : Set an input filter to constrain the text length to the specified number. [integer] android:shadowColor : Place a shadow of the specified color behind the text. [color] @@ -104,7 +105,7 @@ android:scrollbarTrackHorizontal : Defines the horizontal scrollbar track drawab android:scrollbarTrackVertical : Defines the vertical scrollbar track drawable. [reference] android:scrollbarAlwaysDrawHorizontalTrack : Defines whether the horizontal scrollbar track should always be drawn. [boolean] android:scrollbarAlwaysDrawVerticalTrack : Defines whether the vertical scrollbar track should always be drawn. [boolean] -android:fadingEdge : . * Deprecated: This attribute is deprecated and will be ignored as of API level {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH. [flag] +android:fadingEdge : This attribute is deprecated and will be ignored as of API level 14 (ICE_CREAM_SANDWICH). [flag] android:requiresFadingEdge : Defines which edges should be faded on scrolling. [flag] android:fadingEdgeLength : Defines the length of the fading edges. [dimension] android:nextFocusLeft : Defines the next view to give focus to when the next focus is FOCUS_LEFT. [reference] @@ -140,6 +141,8 @@ android:verticalScrollbarPosition : Determines which side the vertical scroll ba android:layerType : Specifies the type of layer backing this view. [enum] android:layoutDirection : Defines the direction of layout drawing. [enum] android:textDirection : Direction of the text. [integer, enum] +android:textAlignment : Alignment of the text. [integer, enum] +android:importantForAccessibility : Controls how this View is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. [integer, enum] android:layout_width : Specifies the basic width of the view. [dimension, enum] android:layout_height : Specifies the basic height of the view. [dimension, enum] android:layout_weight : [float] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion41.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion41.txt index c8d699f..0c2e215 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion41.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion41.txt @@ -1,5 +1,4 @@ Code completion in completion8.xml for android:mar^="50dp": -android:marqueeRepeatLimit : The number of times to repeat the marquee animation. [integer, enum] android:layout_margin : Specifies extra space on the left, top, right and bottom sides of this view. [dimension] android:layout_marginLeft : Specifies extra space on the left side of this view. [dimension] android:layout_marginTop : Specifies extra space on the top side of this view. [dimension] @@ -7,3 +6,4 @@ android:layout_marginRight : Specifies extra space on the right side of this vie android:layout_marginBottom : Specifies extra space on the bottom side of this view. [dimension] android:layout_marginStart : Specifies extra space on the start side of this view. [dimension] android:layout_marginEnd : Specifies extra space on the end side of this view. [dimension] +android:marqueeRepeatLimit : The number of times to repeat the marquee animation. [integer, enum] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion42.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion42.txt index c8be83f..f5b0720 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion42.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion42.txt @@ -1,4 +1,4 @@ Code completion in completion8.xml for android:w^i="100": -android:width : Makes the TextView be exactly this many pixels wide. [dimension] android:layout_width : Specifies the basic width of the view. [dimension, enum] android:layout_weight : [float] +android:width : Makes the TextView be exactly this many pixels wide. [dimension] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion43.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion43.txt index 041f826..50f13d1 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion43.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion43.txt @@ -1,5 +1,4 @@ Code completion in completion8.xml for mar^="60dp": -android:marqueeRepeatLimit : The number of times to repeat the marquee animation. [integer, enum] android:layout_margin : Specifies extra space on the left, top, right and bottom sides of this view. [dimension] android:layout_marginLeft : Specifies extra space on the left side of this view. [dimension] android:layout_marginTop : Specifies extra space on the top side of this view. [dimension] @@ -7,3 +6,4 @@ android:layout_marginRight : Specifies extra space on the right side of this vie android:layout_marginBottom : Specifies extra space on the bottom side of this view. [dimension] android:layout_marginStart : Specifies extra space on the start side of this view. [dimension] android:layout_marginEnd : Specifies extra space on the end side of this view. [dimension] +android:marqueeRepeatLimit : The number of times to repeat the marquee animation. [integer, enum] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion44.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion44.txt index 9dbe81e..3578145 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion44.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completion8-expected-completion44.txt @@ -1,5 +1,4 @@ Code completion in completion8.xml for android:layo^ut_width="fill_parent": -android:layoutDirection : Defines the direction of layout drawing. [enum] android:layout_width : Specifies the basic width of the view. [dimension, enum] android:layout_height : Specifies the basic height of the view. [dimension, enum] android:layout_weight : [float] @@ -11,3 +10,4 @@ android:layout_marginRight : Specifies extra space on the right side of this vie android:layout_marginBottom : Specifies extra space on the bottom side of this view. [dimension] android:layout_marginStart : Specifies extra space on the start side of this view. [dimension] android:layout_marginEnd : Specifies extra space on the end side of this view. [dimension] +android:layoutDirection : Defines the direction of layout drawing. [enum] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion30.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion30.txt index 4b87a0c..efee2bc 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion30.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion30.txt @@ -5,4 +5,4 @@ android:animateLayoutChanges : Defines whether changes in layout (caused by addi android:animateOnClick : Indicates whether the drawer should be opened/closed with an animation when the user clicks the handle. [boolean] android:animationCache : Defines whether layout animations should create a drawing cache for their children. [boolean] android:animationDuration : Sets how long a transition animation should run (in milliseconds) when layout has changed. [integer] -android:animationResolution : Timeout between frames of animation in milliseconds [integer] +android:animationResolution : Timeout between frames of animation in milliseconds * Deprecated: Not used by the framework. [integer] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion32.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion32.txt index 43cf419..825c7b5 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion32.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/completionvalues1-expected-completion32.txt @@ -11,7 +11,7 @@ android:animateLayoutChanges : Defines whether changes in layout (caused by addi android:animateOnClick : Indicates whether the drawer should be opened/closed with an animation when the user clicks the handle. [boolean] android:animationCache : Defines whether layout animations should create a drawing cache for their children. [boolean] android:animationDuration : Sets how long a transition animation should run (in milliseconds) when layout has changed. [integer] -android:animationResolution : Timeout between frames of animation in milliseconds [integer] +android:animationResolution : Timeout between frames of animation in milliseconds * Deprecated: Not used by the framework. [integer] android:autoLink : Controls whether links such as urls and email addresses are automatically found and converted to clickable links. [flag] android:autoStart : When true, automatically start animating [boolean] android:autoText : If set, specifies that this TextView has a textual input method and automatically corrects some common spelling errors. * Deprecated: Use inputType instead. [boolean] @@ -79,15 +79,15 @@ android:editable : If set, specifies that this TextView has an input method. * D android:editorExtras : Reference to an "input-extras" XML resource containing additional data to supply to an input method, which is private to the implementation of the input method. [reference] android:ellipsize : If set, causes words that are longer than the view is wide to be ellipsized instead of broken in the middle. [enum] android:ems : Makes the TextView be exactly this many ems wide. [integer] -android:enabled : Specifies whether the TextView is enabled or not. * Deprecated: Use state_enabled instead. [boolean] -android:endYear : The last year (inclusive), for example "2010". [integer] +android:enabled : Specifies whether the widget is enabled. [boolean] +android:endYear : The last year (inclusive), for example "2010". * Deprecated: Use maxDate instead. [integer] android:entries : Reference to an array resource that will populate the Spinner. [reference] android:eventsInterceptionEnabled : Defines whether the overlay should intercept the motion events when a gesture is recognized. [boolean] android:fadeDuration : Duration, in milliseconds, of the fade out effect after the user is done drawing a gesture. [integer] android:fadeEnabled : Defines whether the gesture will automatically fade out after being recognized. [boolean] android:fadeOffset : Time, in milliseconds, to wait before the gesture fades out after the user is done drawing it. [integer] android:fadeScrollbars : Defines whether to fade out scrollbars when they are not in use. [boolean] -android:fadingEdge : . * Deprecated: This attribute is deprecated and will be ignored as of API level {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH. [flag] +android:fadingEdge : This attribute is deprecated and will be ignored as of API level 14 (ICE_CREAM_SANDWICH). [flag] android:fadingEdgeLength : Defines the length of the fading edges. [dimension] android:fastScrollAlwaysVisible : When set to true, the list will always show the fast scroll interface. [boolean] android:fastScrollEnabled : Enables the fast scroll thumb that can be dragged to quickly scroll through the list. [boolean] @@ -98,7 +98,8 @@ android:fitsSystemWindows : Boolean internal attribute to adjust view layout bas android:flipInterval : [integer] android:focusable : Boolean that controls whether a view can take focus. [boolean] android:focusableInTouchMode : Boolean that controls whether a view can take focus while in touch mode. [boolean] -android:focusedMonthDateColor : The color for the dates of the selected month. [color, reference] +android:focusedMonthDateColor : The color for the dates of the focused month. [color, reference] +android:fontFamily : Font family (named by string) for the text. [string] android:footerDividersEnabled : When set to false, the ListView will not draw the divider before each footer view. [boolean] android:foreground : Defines the drawable to draw over the content. [color, reference] android:foregroundGravity : Defines the gravity to apply to the foreground drawable. [flag] @@ -127,6 +128,7 @@ android:ignoreGravity : Indicates what view should not be affected by gravity. android:imeActionId : Supply a value for EditorInfo.actionId used when an input method is connected to the text view. [integer] android:imeActionLabel : Supply a value for EditorInfo.actionLabel used when an input method is connected to the text view. [string] android:imeOptions : Additional features you can enable in an IME associated with an editor to improve the integration with your application. [flag] +android:importantForAccessibility : Controls how this View is important for accessibility which is if it fires accessibility events and if it is reported to accessibility services that query the screen. [integer, enum] android:inAnimation : Identifier for the animation to use when a view is shown. [reference] android:includeFontPadding : Leave enough room for ascenders and descenders instead of using the font ascent and descent strictly. [boolean] android:indeterminate : Allows to enable the indeterminate mode. [boolean] @@ -231,8 +233,8 @@ android:scrollbarTrackVertical : Defines the vertical scrollbar track drawable. android:scrollbars : Defines which scrollbars should be displayed on scrolling or not. [flag] android:scrollingCache : When set to true, the list uses a drawing cache during scrolling. [boolean] android:secondaryProgress : Defines the secondary progress value, between 0 and max. [integer] -android:selectAllOnFocus : If the text is selectable, select it all when the view takes focus instead of moving the cursor to the start or end. [boolean] -android:selectedDateVerticalBar : Drawable for the vertical bar shown at the beggining and at the end of a selected date. [reference] +android:selectAllOnFocus : If the text is selectable, select it all when the view takes focus. [boolean] +android:selectedDateVerticalBar : Drawable for the vertical bar shown at the beginning and at the end of the selected date. [reference] android:selectedWeekBackgroundColor : The background color for the selected week. [color, reference] android:shadowColor : Place a shadow of the specified color behind the text. [color] android:shadowDx : Horizontal offset of the shadow. [float] @@ -242,7 +244,7 @@ android:showDividers : Setting for which dividers to show. [flag] android:showWeekNumber : Whether do show week numbers. [boolean] android:shownWeekCount : The number of weeks to be shown. [integer] android:shrinkColumns : The zero-based index of the columns to shrink. [string] -android:singleLine : Constrains the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines, and advances focus instead of inserting a newline when you press the enter key. * Deprecated: This attribute is deprecated and is replaced by the textMultiLine flag in the inputType attribute. Use caution when altering existing layouts, as the default value of singeLine is false (multi-line mode), but if you specify any value for inputType, the default is single-line mode. (If both singleLine and inputType attributes are found, the inputType flags will override the value of singleLine.). [boolean] +android:singleLine : Constrains the text to a single horizontally scrolling line instead of letting it wrap onto multiple lines, and advances focus instead of inserting a newline when you press the enter key. * Deprecated: This attribute is deprecated. Use "maxLines" instead to change the layout of a static text, and use the "textMultiLine" flag in the inputType attribute instead for editable text views (if both singleLine and inputType are supplied, the inputType flags will override the value of singleLine). [boolean] android:smoothScrollbar : When set to true, the list will use a more refined calculation method based on the pixels height of the items visible on screen. [boolean] android:soundEffectsEnabled : Boolean that controls whether a view should have sound effects enabled for events such as clicking and touching. [boolean] android:spacing : [dimension] @@ -251,7 +253,7 @@ android:spinnersShown : Whether the spinners are shown. [boolean] android:splitMotionEvents : Sets whether this ViewGroup should split MotionEvents to separate child views during touch event dispatch. [boolean] android:src : Sets a drawable as the content of this ImageView. [color, reference] android:stackFromBottom : Used by ListView and GridView to stack their content from the bottom. [boolean] -android:startYear : The first year (inclusive), for example "1940". [integer] +android:startYear : The first year (inclusive), for example "1940". * Deprecated: Use minDate instead. [integer] android:stepSize : The step size of the rating. [float] android:stretchColumns : The zero-based index of the columns to stretch. [string] android:stretchMode : Defines how columns should stretch to fill the available empty space, if any. [enum] @@ -265,6 +267,7 @@ android:tabStripLeft : Drawable used to draw the left part of the strip undernea android:tabStripRight : Drawable used to draw the right part of the strip underneath the tabs. [reference] android:tag : Supply a tag for the top-level view containing a String, to be retrieved later with View.getTag() or searched for with View.findViewWithTag() . [string] android:text : Text to display. [string] +android:textAlignment : Alignment of the text. [integer, enum] android:textAllCaps : Present the text in ALL CAPS. [boolean] android:textAppearance : Base text color, typeface, size, and style. [reference] android:textColor : Text color. [color, reference] @@ -309,6 +312,6 @@ android:verticalSpacing : Defines the default vertical spacing between rows. [d android:visibility : Controls the initial visibility of the view. [enum] android:weekDayTextAppearance : The text appearance for the week day abbreviation of the calendar header. [reference] android:weekNumberColor : The color for the week numbers. [color, reference] -android:weekSeparatorLineColor : The color for the sepatator line between weeks. [color, reference] +android:weekSeparatorLineColor : The color for the separator line between weeks. [color, reference] android:weightSum : Defines the maximum weight sum. [float] android:width : Makes the TextView be exactly this many pixels wide. [dimension] diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/manifest-expected-completion18.txt b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/manifest-expected-completion18.txt index 39de60c..1215244 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/manifest-expected-completion18.txt +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/manifest-expected-completion18.txt @@ -26,3 +26,4 @@ android:windowSoftInputMode : Specify the default soft-input mode for the main w android:immersive : Flag declaring this activity to be 'immersive'; immersive activities should not be interrupted with other activities or notifications. [boolean] android:hardwareAccelerated : <p>Flag indicating whether the application's rendering should be hardware accelerated if possible. [boolean] android:uiOptions : Extra options for an activity's UI. [flag] +android:parentActivityName : The name of the logical parent of the activity as it appears in the manifest. [string] |