From a7621238bf0202419677380ee3a268142358df83 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Tue, 20 Mar 2012 11:50:57 -0700 Subject: Add support for the WindowBuilder Property Sheet The WindowBuilder propertysheet has been extracted and added as a library in external/eclipse-windowbuilder/. This changeset removes the old propertysheet code (which used the builtin Eclipse property sheet page), and replaces it with the WindowBuilder one, along with new code to aggregate the properties into some categories, as well as tagging some of the properties as advanced. (This was computed by running the same analysis scripts used to produce the most-frequent attributes (sdk/attribute_stats) and instead computing which attributes are used very infrequently or not at all in some representative sample code.) The WindowBuilder propertysheet gives us the following new features: - Highlighting (bold) of important attributes - Masking (and when included, shown in gray italic) of advanced attributes - "Complex" attributes with nesting, used to for example aggregate all the layout parameters into a single node, and the margin layout attributes within those - Tooltips over the attribute names, not values, so they never obscure content In addition, this changeset adds custom implementations of properties, property editors and property dialogs for the core Android property types (XML strings, flags and booleans), which adds the following new features: - Preview rendering of color and image resources inline - Display of -default- attributes (those not specified in XML) using the layoutlib facility getDefaultProperties() to render the implied attributes. For example, if you look at a Button, it will show you that the implied value of "Text Color Link" is "@android:color/holo_blue_light" even though it is not set. NOTE: This only happens for attributes that were actually queried by the widget during rendering. Attributes that are not used by the widget have no (displayed) value. Thus, EditText-specific attributes in a TextView are not shown when a non-EditText TextView is selected. - Evaluation of the attributes. In the above example, in addition to showing @android:color/holo_blue_light, it will chase down the value of this to for example render a blue square next to the value. For drawables it will render a thumbnail, and for String resources it will display the actual value in parentheses. - Field completion in text fields, completing all resource strings (@string, @android:string, etc), as well as flag values. Enum values are chosen in a dropdown. - Checkbox support for boolean values, allowing you to click through the three values true, false and null. - Our custom version of the Property Sheet Page allows you to expand/collapse all properties, and it also has an option letting you switch between Alphabetical Sort (where all attributes are in a flat table, sorted alphabetically by property value), or hierarchical sorted "by category". Currently the categories are simply the defining views, plus 2 more (layout parameters and deprecated attributes). When we get more metadata, it would be nice to switch these to more logical categories, such as "text", "scrolling", "focus", etc. (There is some preliminary support for this in the code, but since the defining-view categories seem to work better those are used instead right now.) Change-Id: Ie4959a3a2c36c083dcc1ba19a70f24b33739fe2f --- .../icons/editor_page_design.png | Bin .../icons/editor_page_source.png | Bin .../com.android.ide.eclipse.adt/icons/editor_palette.png | Bin .../icons/filter_advanced_properties.png | Bin 0 -> 331 bytes .../com.android.ide.eclipse.adt/icons/goto_definition.png | Bin 0 -> 241 bytes .../com.android.ide.eclipse.adt/icons/match_multiple.png | Bin .../icons/properties_default.png | Bin 0 -> 584 bytes .../com.android.ide.eclipse.adt/icons/sdk_manager.png | Bin .../com.android.ide.eclipse.adt/icons/sort_alpha.png | Bin 0 -> 277 bytes 9 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_page_design.png mode change 100755 => 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_page_source.png mode change 100755 => 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_palette.png create mode 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/filter_advanced_properties.png create mode 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/goto_definition.png mode change 100755 => 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/match_multiple.png create mode 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/properties_default.png mode change 100755 => 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/sdk_manager.png create mode 100644 eclipse/plugins/com.android.ide.eclipse.adt/icons/sort_alpha.png (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/icons') diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_page_design.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_page_design.png old mode 100755 new mode 100644 diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_page_source.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_page_source.png old mode 100755 new mode 100644 diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_palette.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/editor_palette.png old mode 100755 new mode 100644 diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/filter_advanced_properties.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/filter_advanced_properties.png new file mode 100644 index 0000000..5f5b078 Binary files /dev/null and b/eclipse/plugins/com.android.ide.eclipse.adt/icons/filter_advanced_properties.png differ diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/goto_definition.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/goto_definition.png new file mode 100644 index 0000000..daac537 Binary files /dev/null and b/eclipse/plugins/com.android.ide.eclipse.adt/icons/goto_definition.png differ diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/match_multiple.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/match_multiple.png old mode 100755 new mode 100644 diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/properties_default.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/properties_default.png new file mode 100644 index 0000000..5696a31 Binary files /dev/null and b/eclipse/plugins/com.android.ide.eclipse.adt/icons/properties_default.png differ diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/sdk_manager.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/sdk_manager.png old mode 100755 new mode 100644 diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/icons/sort_alpha.png b/eclipse/plugins/com.android.ide.eclipse.adt/icons/sort_alpha.png new file mode 100644 index 0000000..112e05b Binary files /dev/null and b/eclipse/plugins/com.android.ide.eclipse.adt/icons/sort_alpha.png differ -- cgit v1.1