| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Iae8bc5c4bc06643691b82242162a93f22c06d868
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This checkin adds a new LocaleManager which provides data related to
locales and regions, such as
(1) The right flag icon to use for a given language and region
combination
(2) The full name of a language code
(3) The full name of a region code
Before this CL, the flag icons were determined by looking at the
Locale instances installed on the machine, and matching up the
language codes with the corresponding country codes. However, that
only works for the locales you have installed -- and on a typical
Linux installation I tried, there were no other locales, and on a Mac
OSX install, many common locales (such as those referenced by standard
Android apps) were not included.
Instead, we now have a static map of bindings from language to region
(though if the language matches the default locale on the system, it
will use the associated country of that locale).
The full names of the languages and regions are also provided. This
allows us to display the corresponding name of a language in the
locale menu, such that users don't for example confuse country codes
and locales; "ca" isn't Canadian but Catalan, and so on.
This checkin also adds all the known language codes into the Language
dropdown for the configuration selector, and displays the
corresponding language name next to the selection. Similarly, it also
sets the relevant flag icon as the page icon for the value XML files.
Change-Id: I2a3a6f037a745a6c56aedb38ecd71ba25324f6fb
|
|
|
|
|
|
| |
Also fix a potential SWT exception.
Change-Id: I45758b0ccad0daf4fe3b309cf93b9cd99bb54904
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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 makes various architectural changes to lint:
(1) Add configurations, which are basically user preferences for lint
in a given project, such as providing a custom severity for an
issue, or disabling a specific warning in a specific file.
In Eclipse, there is a project configuration (stored in lint.xml
in each project), as well as a global configuration (stored using
Eclipse preference data). Project configurations inherit from the
global configuration.
The options dialog now shows up both as a project property page
(showing the issue state for the project configuration), as well
as a normal preference page (showing the global or "fallback"
configuraiton). I also changed the Options UI for issues from a
Table to a TreeViewer to add in category nodes, and changed the
checkbox UI to have a custom severity toggle instead.
The lint quickfixes also now have 3 suppression options:
* Ignore in this file
* Ignore in this project
* Disable check
(2) Change detectors to be registered by class and instantiated for
each lint run rather than having a fixed list of detectors get
reused over and over. Turns out that since some detectors store
state, this prevented lints from running concurrently since the
two runs could stomp each other's state.
To do this effectively I've also switched from a DetectorRegistry
to an IssueRegistry, which contains the global list of available
issues and each issue can point to the class detecting the issue
(and these are created on the fly based on parameters like scope.)
(3) Explicit Categories. Categories used to just be a string property
on issues; now it's an explicit class with both a name and an
explanation, with parents to allow nesting (such that for example
the Usability category has an Icons sub category), and finally the
category class provides sorting. Categories also show up in the
HTML Report now as separate sections.
(4) Other API changes:
* I changed the package containing APIs for lint clients to an
explicit "client" package
* Moved the LintConstants class up from lint-checks to lint-api
and added a LintUtils class which contains many generic methods
that were spread around in specific detectors.
* The detectors are now talking to a wrapper client rather than
directly to lint clients, such that the wrapper client can
filter out results on disabled checks etc, which means that
tools can assume they always get correct reports and don't have
to worry about improperly written detectors.
* I renamed ToolContext to LintClient.
* I got rid of the "isEnabled" state, which was a bit redundant
with the severity since severity has a Severity.IGNORE value.
* I added a LintListener interface, which notifies about progress
(and the CLI tool will print "."'s for each processed file
unless suppressed with -q).
* A new dispose method on the parser interface to for example
allow IDEs to lock/unlock read models on underlying data.
(5) I added a toolbar action for running Lint on the currently
selected project. I also added an --xml export option intended
for use with CI plugins.
Change-Id: Icadd9b2d14d075234d97b31398806111af747b7b
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I ran the latest version of findbugs on our codebase and fixed some
(not all!) of the warnings.
I also ran with Eclipse 3.7 RC3 and updated our compiler warning
settings for the new warnings that are available.
I also fixed some DOS line endings in some files (formatted with CRLF
instead of LF).
Change-Id: I9a9d34a9b60f2cb609245793815d96a4587007b0
|
|
|
|
|
|
|
|
| |
This can be a matter of personal taste, but I find it a lot
more readable to write an if {} else {} sometimes, and it's
perfectly valid, so really it shouldn't be marked as a warning.
Change-Id: Iac1b9bd5f9602b5018f7432422e0a083f4836490
|
|
|
|
| |
Change-Id: I9837714c5673d43fa7108b16ab264f1017c4bd3d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of work on the "Change Layout" refactoring to improve conversion
to a Relative Layout. First, add a "Flatten Hierarchy" option which
can take an entire hierarchy of layout widgets and flatten it down to
a single top level RelativeLayout where the constraints attempt to
reflect the original layout. (This isn't always possible, since some
layout managers offer features not possible to express in
RelativeLayout, such as a LinearLayout with multiple different
weights) but it often works or is at least a good start. (This work
is ongoing, but since my changeset is getting large I want to check in
this snapshot since the functionality is better than what is in the
trunk.)
This changeset also adds a new refactoring: Change Widget Type. This
can be applied to a selection of elements, and it will convert the
widget type to the new target widget type. It will also remove any
attributes that are not valid for the new layout.
It also improves the wizards which display the possible target types.
For Change Widget Type, it will first offer "related" widgets, so for
an AnalogClock it will first offer Digital Clock, for a checkbox it
will offer a checked text view and a radio button, etc.
In addition, it will list Views and Layouts that it finds in any
library jars (except for the builtin Android ones), and any custom
view classes in the project.
There is also now some preliminary support for refactoring unit
tests. These tests must be run as Eclipse plugin tests, since they
utilize the XML model (and the XML model cannot be mocked). The test
infrastructure reads source XML files, applies the refactoring change
list to them, and diffs the output with the known expected output
(also stored as result XML files in the test project).
Finally, there are a number of fixes and improvements to the shared
refactoring code.
Change-Id: I0974653e530dfb4feb625e0eef8257c29d50614b
|
|
Eclipse doesn't have a builtin mechanism to jump between a class and
its test, as well as a way to run tests associated with a given
class. There is however a plugin for this, "moreUnit".
Our projects have split off our unit tests in a separate project,
which requires some per-project configuration to tell moreUnit where
to look for tests. This information has to live with the project
rather than in my workspace, so I'm checking in the configuration file
- it is harmless if you don't have moreUnit but useful if you do.
Change-Id: Id29c46e2eaa89f2ad530c2b24700db28cc823b3b
|