diff options
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata')
22 files changed, 536 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area-one-dot.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area-one-dot.9.png Binary files differnew file mode 100644 index 000000000..690d76efc --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area-one-dot.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area-two-dots.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area-two-dots.9.png Binary files differnew file mode 100644 index 000000000..c3d3e4c29 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area-two-dots.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area.9.png Binary files differnew file mode 100644 index 000000000..6a7a62c59 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/content-area.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched1.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched1.9.png Binary files differnew file mode 100644 index 000000000..9e5ffbf46 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched1.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched2.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched2.9.png Binary files differnew file mode 100644 index 000000000..cfd9c1d64 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched2.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched3.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched3.9.png Binary files differnew file mode 100644 index 000000000..0f2c3eba5 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched3.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched4.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched4.9.png Binary files differnew file mode 100644 index 000000000..ce7321032 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched4.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched5.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched5.9.png Binary files differnew file mode 100644 index 000000000..97d9cd860 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched5.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched6.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched6.9.png Binary files differnew file mode 100644 index 000000000..f9b8a4870 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched6.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched7.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched7.9.png Binary files differnew file mode 100644 index 000000000..bbbb3ad8c --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched7.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched8.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched8.9.png Binary files differnew file mode 100644 index 000000000..35f04b547 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/invalid-patched8.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/layout-bounds-only.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/layout-bounds-only.9.png Binary files differnew file mode 100644 index 000000000..6f7047318 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/layout-bounds-only.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/no-patched-interlace.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/no-patched-interlace.png Binary files differnew file mode 100644 index 000000000..a6d0e94af --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/no-patched-interlace.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/no-patched.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/no-patched.png Binary files differnew file mode 100644 index 000000000..742b1e816 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/no-patched.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched-with-badpatches.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched-with-badpatches.9.png Binary files differnew file mode 100644 index 000000000..1a38972cd --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched-with-badpatches.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched1.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched1.9.png Binary files differnew file mode 100644 index 000000000..6a7a62c59 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched1.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched2.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched2.9.png Binary files differnew file mode 100644 index 000000000..11a1a6d12 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched2.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched3.9.png b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched3.9.png Binary files differnew file mode 100644 index 000000000..8d288c903 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/draw9patch/patched3.9.png diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/jar_example.jar b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/jar_example.jar Binary files differnew file mode 100644 index 000000000..f95b59588 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/jar_example.jar diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/jar_example.jardesc b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/jar_example.jardesc new file mode 100644 index 000000000..14cd44f5a --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/jar_example.jardesc @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> +<jardesc> + <jar path="jar_example.jar"/> + <options buildIfNeeded="true" compress="true" descriptionLocation="/common/tests/data/jar_example.jardesc" exportErrors="false" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/> + <storedRefactorings deprecationInfo="true" structuralOnly="false"/> + <selectedProjects/> + <manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true"> + <sealing sealJar="false"> + <packagesToSeal/> + <packagesToUnSeal/> + </sealing> + </manifest> + <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false"> + <javaElement handleIdentifier="=common/tests<jar.example"/> + </selectedElements> +</jardesc> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_attrs.xml b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_attrs.xml new file mode 100644 index 000000000..db77e1749 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_attrs.xml @@ -0,0 +1,340 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<resources> + <!-- WARNING !!! THIS IS A MOCK FILE. DO NOT USE FOR DOCUMENTATION PURPOSES. + This file has been trimmed down to only extract a number of interesting cases + for unit tests. + + What this contains: + - View + - ViewGroup + - some attributes which format are defined in Theme + - orientation, gravity and layout_gravity defined before they are used + - ViewGroup_Layout + - ViewGroup_MarginLayout + - LinearLayout + - LinearLayout_Layout + - TableLayout + + Note that TableLayout does not have a TableLayout_Layout definition here + where these is a class TableLayout.LayoutData. + --> + + <!-- These are the standard attributes that make up a complete theme. --> + <declare-styleable name="Theme"> + + <!-- Defines the scrollbars size. --> + <attr name="scrollbarSize" format="dimension" /> + + </declare-styleable> + + + <!-- Standard orientation constant. --> + <attr name="orientation"> + <!-- Defines an horizontal widget. --> + <enum name="horizontal" value="0" /> + <!-- Defines a vertical widget. --> + <enum name="vertical" value="1" /> + </attr> + + <!-- Specifies how to place an object, both + its x and y axis, within a larger containing object. --> + <attr name="gravity"> + <!-- Push object to the top of its container, not changing its size. --> + <flag name="top" value="0x30" /> + <!-- Push object to the bottom of its container, not changing its size. --> + <flag name="bottom" value="0x50" /> + <!-- Push object to the left of its container, not changing its size. --> + <flag name="left" value="0x03" /> + <!-- Push object to the right of its container, not changing its size. --> + <flag name="right" value="0x05" /> + <!-- Place object in the vertical center of its container, not changing its size. --> + <flag name="center_vertical" value="0x10" /> + <!-- Grow the vertical size of the object if needed so it completely fills its container. --> + <flag name="fill_vertical" value="0x70" /> + <!-- Place object in the horizontal center of its container, not changing its size. --> + <flag name="center_horizontal" value="0x01" /> + <!-- Grow the horizontal size of the object if needed so it completely fills its container. --> + <flag name="fill_horizontal" value="0x07" /> + <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. --> + <flag name="center" value="0x11" /> + <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. --> + <flag name="fill" value="0x77" /> + </attr> + + <!-- Standard gravity constant that a child can supply to its parent. + Defines how to place an object, both + its x and y axis, within a larger containing object. --> + <attr name="layout_gravity"> + <!-- Push object to the top of its container, not changing its size. --> + <flag name="top" value="0x30" /> + <!-- Push object to the bottom of its container, not changing its size. --> + <flag name="bottom" value="0x50" /> + <!-- Push object to the left of its container, not changing its size. --> + <flag name="left" value="0x03" /> + <!-- Push object to the right of its container, not changing its size. --> + <flag name="right" value="0x05" /> + <!-- Place object in the vertical center of its container, not changing its size. --> + <flag name="center_vertical" value="0x10" /> + <!-- Grow the vertical size of the object if needed so it completely fills its container. --> + <flag name="fill_vertical" value="0x70" /> + <!-- Place object in the horizontal center of its container, not changing its size. --> + <flag name="center_horizontal" value="0x01" /> + <!-- Grow the horizontal size of the object if needed so it completely fills its container. --> + <flag name="fill_horizontal" value="0x07" /> + <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. --> + <flag name="center" value="0x11" /> + <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. --> + <flag name="fill" value="0x77" /> + </attr> + + <declare-styleable name="View"> + <!-- NOTE: View does not have a javadoc. Do not place a comment BEFORE View to make sure it + is NOT interpreted as Javadoc --> + + <!-- Supply an identifier name for this view, to later retrieve it + with {@link android.view.View#findViewById View.findViewById()} or + {@link android.app.Activity#findViewById Activity.findViewById()}. + This must be a + resource reference; typically you set this using the + <code>@+</code> syntax to create a new ID resources. + For example: <code>android:id="@+id/my_id"</code> which + allows you to later retrieve the view + with <code>findViewById(R.id.my_id)</code>. --> + <attr name="id" format="reference" /> + + <!-- Supply a tag for this view containing a String, to be retrieved + later with {@link android.view.View#getTag View.getTag()} or + searched for with {@link android.view.View#findViewWithTag + View.findViewWithTag()}. It is generally preferable to use + IDs (through the android:id attribute) instead of tags because + they are faster and allow for compile-time type checking. --> + <attr name="tag" format="string" /> + + <!-- The initial horizontal scroll offset, in pixels.--> + <attr name="scrollX" format="dimension" /> + + <!-- The initial vertical scroll offset, in pixels. --> + <attr name="scrollY" format="dimension" /> + + <!-- A drawable to use as the background. This can be either a reference + to a full drawable resource (such as a PNG image, 9-patch, + XML state list description, etc), or a solid color such as "#ff000000" + (black). --> + <attr name="background" format="reference|color" /> + + <!-- Boolean that controls whether a view can take focus. By default the user can not + move focus to a view; by setting this attribute to true the view is + allowed to take focus. This value does not impact the behavior of + directly calling {@link android.view.View#requestFocus}, which will + always request focus regardless of this view. It only impacts where + focus navigation will try to move focus. --> + <attr name="focusable" format="boolean" /> + + <!-- Sets the circumstances under which this view will take focus. There are + two choices: "weak" or "normal". The default value is "normal" for + any focusable views. The focus type only applies if the view + has been set to be focusable. --> + <attr name="focusType"> + <!-- This view is focusable, but only if none of its descendants are already focused. --> + <enum name="normal" value="0" /> + <!-- This view will always claim to be focusable. --> + <enum name="weak" value="1" /> + </attr> + + <!-- Controls the initial visibility of the view. --> + <attr name="visibility"> + <!-- Visible on screen; the default value. --> + <enum name="visible" value="0" /> + <!-- Not displayed, but taken into account during layout (space is left for it). --> + <enum name="invisible" value="1" /> + <!-- Completely hidden, as if the view had not been added. --> + <enum name="gone" value="2" /> + </attr> + + <!-- Defines which scrollbars should be displayed on scrolling or not. --> + <attr name="scrollbars"> + <!-- No scrollbar is displayed. --> + <flag name="none" value="0x00000000" /> + <!-- Displays horizontal scrollbar only. --> + <flag name="horizontal" value="0x00000100" /> + <!-- Displays vertical scrollbar only. --> + <flag name="vertical" value="0x00000200" /> + </attr> + + <!-- Sets the width of vertical scrollbars and height of horizontal scrollbars. --> + <attr name="scrollbarSize" /> + + <!-- Text to display. (copied from TextView for the extra localization) --> + <attr name="text" format="string" localization="suggested" /> + + </declare-styleable> + + <!-- Attributes that can be used with a {@link android.view.ViewGroup} or any + of its subclasses. Also see {@link #ViewGroup_Layout} for + attributes that this class processes in its children. --> + <declare-styleable name="ViewGroup"> + <!-- Defines whether a child is limited to draw inside of its bounds or not. + This is useful with animations that scale the size of the children to more + than 100% for instance. In such a case, this property should be set to false + to allow the children to draw outside of their bounds. The default value of + this property is true. --> + <attr name="clipChildren" format="boolean" /> + <!-- Defines the layout animation to use the first time the ViewGroup is laid out. + Layout animations can also be started manually after the first layout. --> + <attr name="layoutAnimation" format="reference" /> + <!-- Defines whether a child's animation should be kept when it is over. Keeping + the animations is useful with animation whose final state is different from + the initial state of the View. This is particularly useful with animation + whose fillAfter property is enabled. This property is set to false by default. --> + <attr name="persistentDrawingCache"> + <!-- The drawing cache is not persisted after use. --> + <flag name="none" value="0x0" /> + <!-- The drawing cache is persisted after a layout animation. --> + <flag name="animation" value="0x1" /> + <!-- The drawing cache is persisted after a scroll. --> + <flag name="scrolling" value="0x2" /> + <!-- The drawing cache is always persisted. --> + <flag name="all" value="0x3" /> + </attr> + </declare-styleable> + + <!-- This is the basic set of layout attributes that are common to all + layout managers. These attributes are specified with the rest of + a view's normal attributes (such as {@link android.R.attr#background}, + but will be parsed by the view's parent and ignored by the child. + <p>The values defined here correspond to the base layout attribute + class {@link android.view.ViewGroup.LayoutParams}. --> + <declare-styleable name="ViewGroup_Layout"> + <!-- Specifies the basic width of the view. This is a required attribute + for any view inside of a containing layout manager. Its value may + be a dimension (such as "12dip") for a constant width or one of + the special constants. --> + <attr name="layout_width" format="dimension"> + <!-- The view should be as big as its parent (minus padding). --> + <enum name="match_parent" value="-1" /> + <!-- The view should be only big enough to enclose its content (plus padding). --> + <enum name="wrap_content" value="-2" /> + </attr> + + <!-- Specifies the basic height of the view. This is a required attribute + for any view inside of a containing layout manager. Its value may + be a dimension (such as "12dip") for a constant height or one of + the special constants. --> + <attr name="layout_height" format="dimension"> + <!-- The view should be as big as its parent (minus padding). --> + <enum name="match_parent" value="-1" /> + <!-- The view should be only big enough to enclose its content (plus padding). --> + <enum name="wrap_content" value="-2" /> + </attr> + </declare-styleable> + + <!-- This is the basic set of layout attributes for layout managers that + wish to place margins around their child views. + These attributes are specified with the rest of + a view's normal attributes (such as {@link android.R.attr#background}, + but will be parsed by the view's parent and ignored by the child. + <p>The values defined here correspond to the base layout attribute + class {@link android.view.ViewGroup.MarginLayoutParams}. --> + <declare-styleable name="ViewGroup_MarginLayout"> + <attr name="layout_width" /> + <attr name="layout_height" /> + <!-- Specifies extra space on the left side of this view. + This space is outside this view's bounds. --> + <attr name="layout_marginLeft" format="dimension" /> + <!-- Specifies extra space on the top side of this view. + This space is outside this view's bounds. --> + <attr name="layout_marginTop" format="dimension" /> + <!-- Specifies extra space on the right side of this view. + This space is outside this view's bounds. --> + <attr name="layout_marginRight" format="dimension" /> + <!-- Specifies extra space on the bottom side of this view. + This space is outside this view's bounds. --> + <attr name="layout_marginBottom" format="dimension" /> + </declare-styleable> + + <!-- This is a linear layout. --> + <declare-styleable name="LinearLayout"> + <!-- Should the layout be a column or a row? Use "horizontal" + for a row, "vertical" for a column. The default is + horizontal. --> + <attr name="orientation" /> + <attr name="baselineAligned" format="boolean|reference" /> + <!-- When a linear layout is part of another layout that is baseline + aligned, it can specify which of its children to baseline align to + (i.e which child TextView).--> + <attr name="baselineAlignedChildIndex" format="integer|color" min="0"/> + <!-- Defines the maximum weight sum. If unspecified, the sum is computed + by adding the layout_weight of all of the children. This can be + used for instance to give a single child 50% of the total available + space by giving it a layout_weight of 0.5 and setting the weightSum + to 1.0. --> + <attr name="weightSum" format="float" /> + </declare-styleable> + + <declare-styleable name="LinearLayout_Layout"> + <attr name="layout_width" /> + <attr name="layout_height" /> + <attr name="layout_weight" format="float" /> + <attr name="layout_gravity" /> + </declare-styleable> + + <declare-styleable name="TableLayout"> + <!-- The 0 based index of the columns to stretch. The column indices + must be separated by a comma: 1, 2, 5. Illegal and duplicate + indices are ignored. You can stretch all columns by using the + value "*" instead. Note that a column can be marked stretchable + and shrinkable at the same time. --> + <attr name="stretchColumns" format="string" /> + <!-- The 0 based index of the columns to shrink. The column indices + must be separated by a comma: 1, 2, 5. Illegal and duplicate + indices are ignored. You can shrink all columns by using the + value "*" instead. Note that a column can be marked stretchable + and shrinkable at the same time. --> + <attr name="shrinkColumns" format="string" /> + <!-- The 0 based index of the columns to collapse. The column indices + must be separated by a comma: 1, 2, 5. Illegal and duplicate + indices are ignored. --> + <attr name="collapseColumns" format="string" /> + </declare-styleable> + + <!-- Test for deprecated attributes. --> + <declare-styleable name="DeprecatedTest"> + <!-- Deprecated comments using delimiters. + Ignored. {@deprecated In-line deprecated.} {@ignore Ignored}. + --> + <attr name="deprecated-inline" /> + + <!-- Deprecated comments on their own line. + @deprecated Multi-line version of deprecated + that works till the next tag. + @ignore This tag must be ignored + --> + <attr name="deprecated-multiline" /> + + <!-- This attribute is not deprecated. --> + <attr name="deprecated-not" /> + + <!-- {@deprecated There is no other javadoc here. } --> + <attr name="deprecated-no-javadoc" format="boolean" /> + + </declare-styleable> + +</resources> + diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_manifest_attrs.xml b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_manifest_attrs.xml new file mode 100755 index 000000000..2335d257a --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/testdata/mock_manifest_attrs.xml @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<resources> + <!-- WARNING !!! THIS IS A MOCK FILE. DO NOT USE FOR DOCUMENTATION PURPOSES. + This file has been trimmed down to only extract a number of interesting cases + for unit tests. + + --> + + <!-- **************************************************************** --> + <!-- These are the attributes used in AndroidManifest.xml. --> + <!-- **************************************************************** --> + <eat-comment /> + + <!-- The overall theme to use for an activity. Use with either the + application tag (to supply a default theme for all activities) or + the activity tag (to supply a specific theme for that activity). + + <p>This automatically sets + your activity's Context to use this theme, and may also be used + for "starting" animations prior to the activity being launched (to + better match what the activity actually looks like). It is a reference + to a style resource defining the theme. If not set, the default + system theme will be used. --> + <attr name="theme" format="reference" /> + + <!-- A user-legible name for the given item. Use with the + application tag (to supply a default label for all application + components), or with the activity, receiver, service, or instrumentation + tag (to supply a specific label for that component). It may also be + used with the intent-filter tag to supply a label to show to the + user when an activity is being selected based on a particular Intent. + + <p>The given label will be used wherever the user sees information + about its associated component; for example, as the name of a + main activity that is displayed in the launcher. You should + generally set this to a reference to a string resource, so that + it can be localized, however it is also allowed to supply a plain + string for quick and dirty programming. --> + <attr name="label" format="reference|string" /> + + <!-- A Drawable resource providing a graphical representation of its + associated item. Use with the + application tag (to supply a default icon for all application + components), or with the activity, receiver, service, or instrumentation + tag (to supply a specific icon for that component). It may also be + used with the intent-filter tag to supply an icon to show to the + user when an activity is being selected based on a particular Intent. + + <p>The given icon will be used to display to the user a graphical + representation of its associated component; for example, as the icon + for main activity that is displayed in the launcher. This must be + a reference to a Drawable resource containing the image definition. --> + <attr name="icon" format="reference" /> + + <!-- A unique name for the given item. This must use a Java-style naming + convention to ensure the name is unique, for example + "com.mycompany.MyName". --> + <attr name="name" format="string" /> + + <!-- Internal version code. This is the number used to determine whether + one version is more recent than another: it has no other meaning than + that higher numbers are more recent. You could use this number to + encode a "x.y" in the lower and upper 16 bits, make it a build + number, simply increase it by one each time a new version is + released, or define it however else you want, as long as each + successive version has a higher number. This is not a version + number generally shown to the user, that is usually supplied + with {@link android.R.attr#versionName}. --> + <attr name="versionCode" format="integer" /> + + <!-- The text shown to the user to indicate the version they have. This + is used for no other purpose than display to the user; the actual + significant version number is given by {@link android.R.attr#versionCode}. --> + <attr name="versionName" format="string" /> + + <!-- .............. --> + + <!-- The <code>manifest</code> tag is the root of an + <code>AndroidManifest.xml</code> file, + describing the contents of an Android package (.apk) file. One + attribute must always be supplied: <code>package</code> 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 + <code>com.google.app.<em>appname</em></code> --> + <declare-styleable name="AndroidManifest"> + <attr name="versionCode" /> + <attr name="versionName" /> + </declare-styleable> + + <!-- The <code>application</code> tag describes application-level components + contained in the package, as well as general application + attributes. Many of the attributes you can supply here (such + as theme, label, icon, permission, process, taskAffinity, + and allowTaskReparenting) serve + as default values for the corresponding attributes of components + declared inside of the application. + + <p>Inside of this element you specify what the application contains, + using the elements {@link #AndroidManifestProvider provider}, + {@link #AndroidManifestService service}, + {@link #AndroidManifestReceiver receiver}, + {@link #AndroidManifestActivity activity}, + {@link #AndroidManifestActivityAlias activity-alias}, and + {@link #AndroidManifestUsesLibrary uses-library}. The application tag + appears as a child of the root {@link #AndroidManifest manifest} tag. --> + <declare-styleable name="AndroidManifestApplication" parent="AndroidManifest"> + <attr name="name" /> + <attr name="theme" /> + <attr name="label" /> + <attr name="icon" /> + <attr name="cantSaveState" format="boolean" /> + </declare-styleable> + + <!-- The <code>permission</code> tag declares a security permission that can be + used to control access from other packages to specific components or + features in your package (or other packages). See the + <a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> + document for more information on permissions. + + <p>This appears as a child tag of the root + {@link #AndroidManifest manifest} tag. --> + <declare-styleable name="AndroidManifestPermission" parent="AndroidManifest"> + <!-- Required public name of the permission, which other components and + packages will use when referring to this permission. This is a string using + Java-style scoping to ensure it is unique. The prefix will often + be the same as our overall package name, for example + "com.mycompany.android.myapp.SomePermission". --> + <attr name="name" /> + <attr name="label" /> + <attr name="icon" /> + </declare-styleable> + + + <!-- The <code>activity-alias</code> tag declares a new + name for an existing {@link #AndroidManifestActivity activity} + tag. + + <p>Zero or more {@link #AndroidManifestIntentFilter intent-filter} + tags can be included inside of an activity-alias, to specify the Intents + that it can handle. If none are specified, the activity can + only be started through direct specification of its class name. + The activity-alias tag appears as a child tag of the + {@link #AndroidManifestApplication application} tag. --> + <declare-styleable name="AndroidManifestActivityAlias" parent="AndroidManifestApplication"> + <!-- Required name of the class implementing the activity, deriving from + {@link android.app.Activity}. This is a fully + qualified class name (for example, com.mycompany.myapp.MyActivity); as a + short-hand if the first character of the class + is a period then it is appended to your package name. --> + <attr name="name" /> + <attr name="label" /> + <attr name="icon" /> + </declare-styleable> + + <declare-styleable name="AndroidManifestNewParentNewElement" + parent="AndroidManifest.AndroidManifestNewParent"> + <attr name="name" /> + <attr name="label" /> + <attr name="icon" /> + </declare-styleable> + +</resources> |