| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I6cd127ed7034ba33c32a1994bc312e187a15b250
|
|
|
|
|
|
|
|
|
|
| |
Turns off the ability to use @SuppressWarnings with optional
errors is available, but off by default (see Eclipse issue 392875).
This turns that off, makes missing enums in switch statements a
warning, and synchronizes the settings file to all projects (except
tests.)
Change-Id: Iad7060523b6ee2cbbca97e0a6ffedb264b185222
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, update our various project-specific Eclipse compiler settings
configuration files to include the new Eclipse 4 flags.
Second, turn off the "Unchecked conversion from non-annotated type to
@NonNull" warnings; there are hundreds or thousands of these, and
there isn't much we can do about them when they're coming from
platform and library APIs.
Third, make the lint projects warning-clean again by addressing
various warnings Eclipse found (such as some unclosed resources and
some null handling issues; yesterday's null annotation fixes only
addressed errors, not warnings.)
Change-Id: If75f7401a1cbeef1bf58b47ccaa9ad17bede7f91
|
|
|
|
|
|
| |
This reverts commit 27dac06bfc4297dc9a018edc534f44ecf96cd724.
Change-Id: I6708bd4091f0cb677484669479357d479b9db5fa
|
|
|
|
| |
This reverts commit a7621238bf0202419677380ee3a268142358df83.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a new @NonNull annotation, to match our existing
@Nullable annotation, and it adds configuration settings for Eclipse
3.8 / Eclipse 4.2 which configures the new null analysis there to use
our own annotations. Note that the annotations only have source
retention so there is no extra size or class-loading overhead. (To use
findbugs you'll need to temporarily change retention to class-level.)
In upcoming CL's I'll use these annotations to clarify the Lint API
and other APIs.
Change-Id: I99096d8b8a7e25ef002624d592da7700195a5872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset makes the SDK codebase compile with source=1.6 (which
means it also requires JDK 6). This means that methods implementing an
interface requires @Override's. It also means we can start using APIs
like the ArrayDeque class and methods like String#isEmpty().
This changeset looks big but the change is trivial: it's basically
adding @Override in all the places that need it, along with some other
automatic Eclipse cleanup in certain files (such as reordering imports
where they were incorrectly ordered (because older versions of Eclipse
didn't always handle inner classes right)), as well as cleaning up
trailing whitespace and removing some $NON-NLS-1$ markers on lines
where there aren't any string literals anymore.
This changeset also sets the source and target JDK level to 6 in the
Eclipse compiler .settings file, and synchronizes this file to all the
other Eclipse SDK projects.
Change-Id: I6a9585aa44c3dee9a5c00739ab22fbdbcb9f8275
|
|
This changeset adds two forms of view attribute metadata:
* First, it records the most commonly used attributes for each
view. This was determined by gathering statistics on as many layout
files as I could find and then picking those that are used 10% or
more.
* Second, it records in the attribute metadata which View defines a
given attribute.
The context menu uses the above information to present the available
attributes in several ways:
* In the top level menu, where we had "Edit ID", and if applicable
"Edit Text", it now lists the top attributes instead. For example,
for a RatingBar the first handful of menu options are "Edit ID...",
"Edit NumStars...", "Edit StepSize...", "Edit Style..." and
"IsIndicator" (a boolean pull-right menu).
Incidentally this automatically handles some cases which were
manually handled before, so the code in LinearLayoutRule to add an
"Orientation" menu is no longer needed; it's just one of the two
common attributes handled by the new attribute list.
* The "Properties" menu is now called "Other Properties", and instead
of showing all properties, it has a new level of menus:
* "Recent". This is initially empty, but as you edit other attributes,
it gets populated (in most recently used order, kept up to date)
with recently edited properties.
* One submenu for each defining View super class listing exactly
the attributes defined by that view. This is useful for browsing
and editing related attributes. If you are looking at a textual
view like a Button for example, you can look at the "TextView"
menu to find all the text related options (TextColor, TextSize,
etc). These menus are listed from the nearest to the further
superclass, so for example if you right click on a CalendarView
you'll see these menus:
Recent >
----------------------------
Defined by CalendarView >
Inherited from FrameLayout >
Inherited from ViewGroup >
Inherited from View >
----------------------------
Layout Parameters >
----------------------------
All By Name >
* As you can see from the above, there are two more menus below the
inherited menu items. "Layout Parameters" lists all the layout
parameters available for the selected nodes (which is defined not
by the view itself but the view that it is contained within). And
finally there is "All By Name", which is a complete menu
containing all available attributes for the view (and this is what
the Properties menu used to contain).
* The code which computes a display name from an attribute was also
tweaked to capitalize not just the first letter but any first word
letter, so for example when you look at the possible values for
Gravity you now see "Clip Vertical" instead of "Clip vertical".
* The edit property dialog for the properties menus now uses @string
or @style resource choosers for the text, hint and style attributes
(used to just be a plain text box.)
Change-Id: I3b30d48b85fd13f0190c760756bf383a47b3f4a5
|