OSDN Git Service

android-x86/sdk.git
13 years agoImprove custom class loading failure handling
Tor Norbye [Fri, 24 Dec 2010 01:32:12 +0000 (17:32 -0800)]
Improve custom class loading failure handling

For background, see
http://code.google.com/p/android/issues/detail?id=13389

We currently both load and instantiate custom view classes under the
same try/catch block, and if there is a failure, the user is informed
that the class could not be -found-. However, in many cases the real
failure is in actually -instantiating- the class, so telling the user
that the class could not be found is misleading and can make the user
hunt down library dependencies, checking jar contents, etc.

This changeset improves the situation in the following ways:

- The code to load and instantiate are handled separately, and the
  list of missing classes is kept separate from the list of
  uninstantiatable classes.

- The error display in the layout editor lists these two categories
  separately.

- For instantiation errors, we dig up the root cause and log that
  one. The error display points to the Error Log for more details.

- If the class looks like it might be a custom view class (rather than
  a loading or instantiation failure in one of the Android or Add-Ons
  classes) then the error message also includes a tip about using
  View.isInEditMode to try to do less work for design time rendering.

Change-Id: I947ad91e0d7973e9c3aefed1824f61c92c5fb1ed

13 years agoMerge "Add Up/Down Icons"
Tor Norbye [Thu, 23 Dec 2010 00:04:23 +0000 (16:04 -0800)]
Merge "Add Up/Down Icons"

13 years agoAdd Up/Down Icons
Tor Norbye [Thu, 23 Dec 2010 00:00:13 +0000 (16:00 -0800)]
Add Up/Down Icons

Add Up/Down icons to the outline context menu for the Move Up and Move Down actions.

Change-Id: I1d94871034946eb166968c76fbab61be5f1f23e5

13 years agoMerge "Update keybinding registration"
Tor Norbye [Wed, 22 Dec 2010 23:42:53 +0000 (15:42 -0800)]
Merge "Update keybinding registration"

13 years agoMerge "Add Move Up/Down Actions"
Tor Norbye [Wed, 22 Dec 2010 23:42:42 +0000 (15:42 -0800)]
Merge "Add Move Up/Down Actions"

13 years agoUpdate keybinding registration
Tor Norbye [Wed, 22 Dec 2010 00:58:21 +0000 (16:58 -0800)]
Update keybinding registration

We were using deprecated registration hooks for our 3 keybindings;
this changeset updates to the currently supported way to do keybinding
registration.

Change-Id: If6f95f0075a7d6662d320f8001836b5c846e64be

13 years agoAdd Move Up/Down Actions
Tor Norbye [Wed, 22 Dec 2010 00:44:28 +0000 (16:44 -0800)]
Add Move Up/Down Actions

This changeset adds "Move Up" and "Move Down" context menu items to
the outline, as well as keyboard shortcuts for these: + and -. The
actions apply only when the Outline window has focus. Thus, to reorder
an item you can select it, then press + repeatedly to move it down in
the hierarchy or - to move it back up.

In addition, this changeset fixes a selection syncing issue which also
affected drag & drop: It will now correctly always select the target
dropped tree items after a drag or reorder.

Change-Id: I11ce4fd302e537b86a614a7cbe59f1ac47f61aa5

13 years agoMerge "Rewrite Outline drag & drop handler"
Tor Norbye [Tue, 21 Dec 2010 23:52:23 +0000 (15:52 -0800)]
Merge "Rewrite Outline drag & drop handler"

13 years agoRewrite Outline drag & drop handler
Tor Norbye [Fri, 17 Dec 2010 16:55:56 +0000 (08:55 -0800)]
Rewrite Outline drag & drop handler

Rewrite the drag source and drop target listeners for the Outline. The
drop target listener now uses the SWT Tree support for drag & drop
(such that you for example get drop position feedback lines between
siblings). You can now drag items within the outline to do precise
reordering, as well as target particular positions during drops,
either within the outline or from the canvas or the palette.

This changeset also fixes a number of other issues I ran into at the same time:

- Fix keyboard shortcuts such that they map to the same context as the
  canvas (e.g. when you activate the outline it shows the same undo
  context as if you click in the associated canvas)

- Fix a bug with context menu code when none of the options are
  selected in the XML

- Fix selection dispatch. If you had two side by side canvases,
  selecting items in the Outline would show highlights in both
  canvases; it now only causes selection syncing with the associated
  canvas.

Change-Id: I00c3c38fabf3711c826a3bc527356cbc77ad4a7e

13 years agoMerge "LayoutLib API refactoring"
Xavier Ducrohet [Tue, 21 Dec 2010 18:29:29 +0000 (10:29 -0800)]
Merge "LayoutLib API refactoring"

13 years agoLayoutLib API refactoring
Xavier Ducrohet [Thu, 16 Dec 2010 00:08:57 +0000 (16:08 -0800)]
LayoutLib API refactoring

Change-Id: I40abba4c4f786755c2a1c0e70df4d7bc08e2bcde

13 years agoMerge "Bugfix in Android JUnit run configuration page in Eclipse"
Tor Norbye [Tue, 21 Dec 2010 00:30:38 +0000 (16:30 -0800)]
Merge "Bugfix in Android JUnit run configuration page in Eclipse"

13 years agoMerge "Edit AVDs in AVD Manager."
Raphael Moll [Mon, 20 Dec 2010 23:05:22 +0000 (15:05 -0800)]
Merge "Edit AVDs in AVD Manager."

13 years agoMerge "Make AvdCreationDialog compatible with WindowBuilder."
Raphael Moll [Mon, 20 Dec 2010 23:04:57 +0000 (15:04 -0800)]
Merge "Make AvdCreationDialog compatible with WindowBuilder."

13 years agoMerge "Reenable Show Included In, and handle target compatibility"
Tor Norbye [Mon, 20 Dec 2010 21:52:40 +0000 (13:52 -0800)]
Merge "Reenable Show Included In, and handle target compatibility"

13 years agoBugfix in Android JUnit run configuration page in Eclipse
Thomas Westling [Mon, 20 Dec 2010 12:25:22 +0000 (13:25 +0100)]
Bugfix in Android JUnit run configuration page in Eclipse

Bugfix for bug 12411:
code.google.com/p/android/issues/detail?id=12411
When a user leaves the Android JUnit run configuration page,
an icon is disposed. Upon returning to the page, the plugin
tries to reuse the icon, which is disposed, causing an
IllegalArgumentException. This bug is fixed by this commit.

Change-Id: I260b6a5cd75192abc7aa051d6f141956a391c0e4

13 years agoEdit AVDs in AVD Manager.
Raphael Moll [Sun, 19 Dec 2010 22:47:33 +0000 (14:47 -0800)]
Edit AVDs in AVD Manager.

SDK Bug: b.android.com/13276

Change-Id: I495cd8cb9e4287a7cb14a3797e5b9d3b3e07160b

13 years agoMake AvdCreationDialog compatible with WindowBuilder.
Raphael Moll [Sun, 19 Dec 2010 19:25:17 +0000 (11:25 -0800)]
Make AvdCreationDialog compatible with WindowBuilder.

Change-Id: I5fca1db1625eff1ff98940fcf68475a80a8f361c

13 years agoReenable Show Included In, and handle target compatibility
Tor Norbye [Sat, 18 Dec 2010 17:23:03 +0000 (09:23 -0800)]
Reenable Show Included In, and handle target compatibility

Hook up the Show Included In menu item to the layout library's
Capability.EMBEDDED_LAYOUT which tracks whether nested parsers are
handled by the layout library. Also handle this properly in the some
related scenarios: If you switch rendering targets on a page that is
already in an included context, remove that included context (since
otherwise you'll be editing the including file rather than the
included file_), and when you jump from an including file to an
included file, only set inclusion context if the target file is either
not open or its rendering target supports inclusion.

Also fix a bug in the initialization of capabilities; it was passing
the project target rather than the rendering target back from the
onXmlLoaded() method, which meant the clipping support flag was not
set correctly.

Change-Id: I2c1ae55d44fc627c56ecbcb76a7f163e8094f975

13 years agoMerge "Hyperlink improvements"
Tor Norbye [Sat, 18 Dec 2010 00:41:25 +0000 (16:41 -0800)]
Merge "Hyperlink improvements"

13 years agoHyperlink improvements
Tor Norbye [Fri, 17 Dec 2010 20:43:20 +0000 (12:43 -0800)]
Hyperlink improvements

Fix Java hyperlink navigation such that it works with android.R
resources too, not just project local R fields.

Fix navigation into @android values (this was already supported for
file-based resources in the framework, but it did not search for
values, and did not navigate into specific portions of the (possibly
large) XML files.

Fix such that opening an XML file shows the editor tab, not the
name/value pair editor.

Fix hyperlink modifier key combination and target name (to make them
uniform and match the other items listed in the Preferences dialog's
"Hyperlinking" category.

Change-Id: Iabbb8e65964c824d8e8e649da77c2e7af809c373

13 years agoMerge "Fix keyboard shortcut bug"
Tor Norbye [Fri, 17 Dec 2010 20:55:04 +0000 (12:55 -0800)]
Merge "Fix keyboard shortcut bug"

13 years agoFix keyboard shortcut bug
Tor Norbye [Fri, 17 Dec 2010 04:10:14 +0000 (20:10 -0800)]
Fix keyboard shortcut bug

13231: Keyboard shortcuts often don't work in the layout editor

We've had this bug where intermittently the keyboard shortcuts for
cut, copy, paste, undo, etc. haven't worked.  Turns out it's not
intermittent at all: Our keybinding registration was wrong, which
meant that only the last opened editor would actually work; the global
actions would ALWAYS map to that one editor. I discovered this when I
happened to have two editors side by side!

The global action registration mechanism we were using assumes that
each view has its own IActionBar. That's generally true, but NOT for
editors! That means we have to re-register the action bindings
ourselves when the active editor changes. To do that, we register our
own IEditorActionBarContributor, which will notify us when the actions
need to be updated for editor activation.

Change-Id: Ia49246a1f0fd14a717efe591b04b1b6529b23922

13 years agoMerge "New "DecorComposite" for sub-panels in the GLE."
Raphael Moll [Fri, 17 Dec 2010 19:50:15 +0000 (11:50 -0800)]
Merge "New "DecorComposite" for sub-panels in the GLE."

13 years agoNew "DecorComposite" for sub-panels in the GLE.
Raphael Moll [Fri, 17 Dec 2010 17:41:06 +0000 (09:41 -0800)]
New "DecorComposite" for sub-panels in the GLE.

A DecorComposite wraps a control or composite such as the palette
and adds a little header with an icon, a title and an optional
toolbar of icon/actions.

The GLE palette is revamped to use this. Some actions will be
added later to toggle viewing views or layouts.

Eventually the new property panel will be one of these too.

Terminology: I tried to avoid the words "panel" or "page" or "pane"
which are just too overused. Since this is merely more than decoration
around a control, it's a DecorComposite.

I've also added a couple builder classes to make it less verbose
to set GridLayout and GridData objects. If these are useful out
of the editors, we could move them somewhere else later.

Change-Id: I5065411bfe48148c267ec6438b0ec5424123ab8c

13 years agoMerge "Refactor: rename PaletteComposite into PaletteControl"
Raphael Moll [Fri, 17 Dec 2010 17:57:20 +0000 (09:57 -0800)]
Merge "Refactor: rename PaletteComposite into PaletteControl"

13 years agoRefactor: rename PaletteComposite into PaletteControl
Raphael Moll [Thu, 16 Dec 2010 22:18:55 +0000 (14:18 -0800)]
Refactor: rename PaletteComposite into PaletteControl

Change-Id: I7ce573d729255a07a65857a7f17d6a1cbb7f96d8

13 years agoMerge "Fix to edit window with WindowsBuilder."
Raphael Moll [Fri, 17 Dec 2010 17:47:12 +0000 (09:47 -0800)]
Merge "Fix to edit window with WindowsBuilder."

13 years agoMerge "Improve handling of custom width/height layout attributes"
Tor Norbye [Thu, 16 Dec 2010 22:24:24 +0000 (14:24 -0800)]
Merge "Improve handling of custom width/height layout attributes"

13 years agoMerge "Fix non-externalized-string references"
Tor Norbye [Thu, 16 Dec 2010 22:23:52 +0000 (14:23 -0800)]
Merge "Fix non-externalized-string references"

13 years agoFix to edit window with WindowsBuilder.
Raphael Moll [Thu, 16 Dec 2010 22:17:21 +0000 (14:17 -0800)]
Fix to edit window with WindowsBuilder.

Change-Id: I19e6933abac980cf688860e37436455bd5787909

13 years agoImprove handling of custom width/height layout attributes
Tor Norbye [Thu, 16 Dec 2010 21:17:04 +0000 (13:17 -0800)]
Improve handling of custom width/height layout attributes

Remove the "Custom..." items from the menus (which were not hooked up
anyway).

If there is a custom value (e.g. not fill_parent, match_parent or
wrap_content), add it into the menu directly (such as "42dip"), and
show it as selected.

In addition, always add a "Other..." menu item at the end. Invoking
Other will pop up a dialog asking you to enter a new custom value,
which is then applied.

This addresses issue #2 in multi-issue bug
13134: Eclipse layout editor contains many bugs

Change-Id: Ic1a84a789c53dd3a15b807a29461b80dc1b49c9f

13 years agoFix non-externalized-string references
Tor Norbye [Thu, 16 Dec 2010 21:29:01 +0000 (13:29 -0800)]
Fix non-externalized-string references

I had accidentally used //NON-NLS- instead of //$NON-NLS- in some
code.  That explains why Eclipse would sometimes insert a space
between the // and the NON part...

This changeset replaces these with proper //$NON-NLS- entries.

Change-Id: Icf4251a352895293ebe82d8207a4dbfe7d8126d5

13 years agoMerge "Icons for the XML editor page tabs."
Raphael Moll [Thu, 16 Dec 2010 19:23:21 +0000 (11:23 -0800)]
Merge "Icons for the XML editor page tabs."

13 years agoIcons for the XML editor page tabs.
Raphael Moll [Thu, 16 Dec 2010 00:36:54 +0000 (16:36 -0800)]
Icons for the XML editor page tabs.

Change-Id: I34b0b2fd34a0e503c4eb9656ed36979af22ec6ce

13 years agoMerge "Fix canvas scrolling bug"
Tor Norbye [Wed, 15 Dec 2010 23:09:54 +0000 (15:09 -0800)]
Merge "Fix canvas scrolling bug"

13 years agoFix canvas scrolling bug
Tor Norbye [Wed, 15 Dec 2010 04:30:08 +0000 (20:30 -0800)]
Fix canvas scrolling bug

Fix the bug where zooming in, then panning, then zooming out could
result in lost scrollbars or the canvas no longer being in the visible
viewport.

Also handle the page increment setting code more cleanly.

Change-Id: I5c8e6580259a3a925e74d700771e740eaa5eb95e

13 years agoMerge "Fix Palette scrollbar bug"
Tor Norbye [Wed, 15 Dec 2010 22:00:48 +0000 (14:00 -0800)]
Merge "Fix Palette scrollbar bug"

13 years agoMerge "Fix javadoc for layout lib api."
Xavier Ducrohet [Wed, 15 Dec 2010 21:50:02 +0000 (13:50 -0800)]
Merge "Fix javadoc for layout lib api."

13 years agoFix Palette scrollbar bug
Tor Norbye [Wed, 15 Dec 2010 21:17:22 +0000 (13:17 -0800)]
Fix Palette scrollbar bug

Fixes the problem that on Mac, when you close a palette category the
scrollbar thumb size was not updated. The thumb value could be set to
0 in that case, which is ignored by SWT.

This changeset also sets the increment and the page increment on the
scrollbar to improve the behavior of clicking the scrollbar arrows or
clicking above and below the thumb.

The changeset also sets all the values of the scrollbar in a single go
(via the setValues() call); this should improve performance, and in
conjunction with the first fix (to the thumb value) I am hoping this
addresses issue 13097: Gingerbread Layout Editor scroll bar bugs

Change-Id: I8274e4bdd8828ac814f04b99650f1209b8636797

13 years agoFix javadoc for layout lib api.
Xavier Ducrohet [Wed, 15 Dec 2010 21:32:51 +0000 (13:32 -0800)]
Fix javadoc for layout lib api.

Change-Id: I42b835ef2dc34af069567555ce9a4e4ecfcd6639

13 years agoMerge "Front property sheet on outline double click"
Tor Norbye [Wed, 15 Dec 2010 21:29:55 +0000 (13:29 -0800)]
Merge "Front property sheet on outline double click"

13 years agoMerge "Property sheet: Fix tooltip and selected property painting"
Tor Norbye [Wed, 15 Dec 2010 21:28:15 +0000 (13:28 -0800)]
Merge "Property sheet: Fix tooltip and selected property painting"

13 years agoProperty sheet: Fix tooltip and selected property painting
Tor Norbye [Wed, 15 Dec 2010 17:47:37 +0000 (09:47 -0800)]
Property sheet: Fix tooltip and selected property painting

This CL contains the following fixes for the property sheet:

(1) Add a custom paint to the selection background. In Eclipse 3.5 and
    3.6, selected items in the property sheet are unreadable because
    they are painted white on white (well at least they are on
    Macs). This seems to be fixed in Eclipse 3.7M3. In any case, this
    changeset adds a custom paint listener which adds a mild red
    gradient below the selection to make the property name readable.

(2) Override the builtin property sheet's display of the property
    description such that it can take the property description and
    "linearize" it (remove newlines and make it into a single line
    display item).

Change-Id: Ib9c338759f79afa51f07deacb3962129e321c16b

13 years agoMerge "Fix DDMS and HierarchyViewer .bat files on Windows"
Raphael Moll [Wed, 15 Dec 2010 21:00:07 +0000 (13:00 -0800)]
Merge "Fix DDMS and HierarchyViewer .bat files on Windows"

13 years agoFix DDMS and HierarchyViewer .bat files on Windows
Raphael Moll [Wed, 15 Dec 2010 20:51:26 +0000 (12:51 -0800)]
Fix DDMS and HierarchyViewer .bat files on Windows

These were not setting the "bin dir" properpty correctly,
and as a consequence the tools complain they can't find adb.exe.

The fix is to set it to the directory of the script but to
avoid spaces-in-path issues we use the "~fs" modifier to get
a space-free short name for the %cd% value. And since we can't
use use %cd% combined with ~fs, we use a for loop trick to set it.

Note that ddms.bat was in unix end-of-line mode so I changed it
back to DOS end-of-line mode.

Change-Id: Ic9e55643b551898043add27c12193a0949f40bb0

13 years agoMerge "Fix model locking"
Tor Norbye [Wed, 15 Dec 2010 15:12:09 +0000 (07:12 -0800)]
Merge "Fix model locking"

13 years agoFix model locking
Tor Norbye [Wed, 15 Dec 2010 05:42:43 +0000 (21:42 -0800)]
Fix model locking

Fix the bug where editors sometimes can't be reopened due to an
assertion in the XML model.  The IncludeFinder code I added last week
had a mismatch between the type of lock acquired (an edit lock) and
the lock released (a read lock).

Change-Id: I2d3053ec4e9d1efba62ab0f3216d15f738192ddd

13 years agoMerge "Remove some actions before milestone"
Tor Norbye [Wed, 15 Dec 2010 03:33:41 +0000 (19:33 -0800)]
Merge "Remove some actions before milestone"

13 years agoRemove some actions before milestone
Tor Norbye [Tue, 14 Dec 2010 16:22:59 +0000 (08:22 -0800)]
Remove some actions before milestone

The Show Include facility doesn't work properly until we backport
layoutlib to all the 2.x SDK layoutlibs.  The Play Animation test
isn't yet productized.

Change-Id: Ib4cd0f0cff029fe23ffaca72a96561a0d748f86f

13 years agoFront property sheet on outline double click
Tor Norbye [Wed, 15 Dec 2010 03:25:38 +0000 (19:25 -0800)]
Front property sheet on outline double click

When you double click on an item in the Outline tree view, open and/or
front the Property Sheet showing the selected item.

This fixes:
13151: Double clicking on an item in the Outline window used to switch
to the Properties tab, but no longer does so with ADT 8.0+

Change-Id: Ic1912d15383ecf15020dc306d2692b2d15e08d00

13 years agoMerge "Only allow drag images for canvas drags"
Tor Norbye [Wed, 15 Dec 2010 01:11:40 +0000 (17:11 -0800)]
Merge "Only allow drag images for canvas drags"

13 years agoOnly allow drag images for canvas drags
Tor Norbye [Wed, 15 Dec 2010 00:30:29 +0000 (16:30 -0800)]
Only allow drag images for canvas drags

The outline view "reuses" the drag source listener for the canvas,
doing some tricks with mouse events to make it look like the drag is
originating within the canvas. However, the image previews of drags do
not work well in this case. Therefore, stash data on the drag souce
such that the drag source handler can only do image previews when the
drag source is really the canvas instead of the outline page.

Change-Id: I919264f001fa232053a0b9831ebc32ee22beb877

13 years agoMerge "Set layout editor scrollbar increments"
Tor Norbye [Wed, 15 Dec 2010 00:42:17 +0000 (16:42 -0800)]
Merge "Set layout editor scrollbar increments"

13 years agoMerge "Various layout fixes"
Tor Norbye [Wed, 15 Dec 2010 00:42:01 +0000 (16:42 -0800)]
Merge "Various layout fixes"

13 years agoSet layout editor scrollbar increments
Tor Norbye [Tue, 14 Dec 2010 23:30:53 +0000 (15:30 -0800)]
Set layout editor scrollbar increments

Fix 13097: Gingerbread Layout Editor scroll bar bugs, part 1:
Set the layout editor scrollbar increments to 20 (they were 1, meaning
that each click on the scrollbar down button would scroll the view by
one pixel rather than a "chunk" like 20).

Set the scrollbar page increment to the visual height of the
canvas. This means that if you click below the visible range in the
scrollbar it will jump a full scrollbar increment, as expected.

(This is the first half of 13097. The second half deals with something
unrelated.)

Change-Id: I80c544b749d08d1fdc127d682ef8a75aed9aa8e7

13 years agoVarious layout fixes
Tor Norbye [Tue, 14 Dec 2010 15:15:01 +0000 (07:15 -0800)]
Various layout fixes

First, fix absolute layout such that it properly handles both screen
scaling as well as various screen resolution densities when it
computes the dip positions.

Second, pass the bounds surrounding the mouse position when a drag is
initiated to the view rules. This is used by both absolute layout and
relative layout to properly handle dragging bounds. In particular, in
relative layout this is used to match a border not only when the mouse
cursor gets near the edge, but when the bound edges also get near the
edge. In absolute layout this is used to show a correct bound
rectangle that has the proper offset from the original drag position
(which may not be the center, which until now it was assuming).

Third, in RelativeLayout, when there are no children, offer a left
alignment regardless of where you are within the rectangle. This is
similar to how LinearLayout works.

In addition, two internal changes:
* Factor the various RelativeLayout string constants into the
  LayoutConstants class. This had the nice side effect of revealing a
  typo where we were referencing a non-existing value!  Constants FTW!
* Make the RulesEngine log the exceptions, not just the error
  messages, thrown by IViewRule calls. That way the full stack trace
  is available in the Error Viewer, including line numbers etc.

Change-Id: I0b83df71b36741e65a1eb2003ed044157eb6f0cd

13 years agoMerge "ninepatch support for drawing at a different density."
Xavier Ducrohet [Tue, 14 Dec 2010 20:03:31 +0000 (12:03 -0800)]
Merge "ninepatch support for drawing at a different density."

13 years agoMerge "reconcile tools_r8 into master"
Jean-Baptiste Queru [Tue, 14 Dec 2010 15:31:39 +0000 (07:31 -0800)]
Merge "reconcile tools_r8 into master"

13 years agoreconcile tools_r8 into master
Jean-Baptiste Queru [Tue, 14 Dec 2010 15:24:48 +0000 (07:24 -0800)]
reconcile tools_r8 into master

Change-Id: I517ffaa035e3d403f06c942806e9fd4e3d1a01f1

13 years agoMerge "Add Java Hyperlink Support and XML improvements"
Tor Norbye [Tue, 14 Dec 2010 15:20:08 +0000 (07:20 -0800)]
Merge "Add Java Hyperlink Support and XML improvements"

13 years agoninepatch support for drawing at a different density.
Xavier Ducrohet [Tue, 14 Dec 2010 02:27:10 +0000 (18:27 -0800)]
ninepatch support for drawing at a different density.

Change-Id: I0932f8a51d30c256157fccf67e77cf165ba93b58

13 years agoMerge "Move to rev 10 and update change log"
Xavier Ducrohet [Tue, 14 Dec 2010 02:24:40 +0000 (18:24 -0800)]
Merge "Move to rev 10 and update change log"

13 years agoMerge "ADT: always give fill_parent to layoutlib."
Xavier Ducrohet [Tue, 14 Dec 2010 02:24:32 +0000 (18:24 -0800)]
Merge "ADT: always give fill_parent to layoutlib."

13 years agoADT: always give fill_parent to layoutlib.
Xavier Ducrohet [Mon, 13 Dec 2010 22:18:09 +0000 (14:18 -0800)]
ADT: always give fill_parent to layoutlib.

If a layout is created for Android 2.3 but then rendered in 1.5 it'll
fail because 1.5 doesn't know what match_parent is.

This change makes the parser given to layoutlib replace on the fly
match_parent with fill_parent.

Change-Id: I45a22dea98388f8f0c5673bdaa9cbbf9a88f5422

13 years agoAdd Java Hyperlink Support and XML improvements
Tor Norbye [Thu, 9 Dec 2010 23:35:49 +0000 (15:35 -0800)]
Add Java Hyperlink Support and XML improvements

Adds Android-related hyperlinks to Java files.  If you for example
have this code in your Activity:

setContentView(R.layout.main);

and you control click on "main", this will now offer (in addition to
the normal "Declaration" hyperlink) go to "XML Declaration"), which
will then warp to the main.xml file.

You can add in the second modifier key to directly jump to the Android
resource and bypass the normal Java declaration (which would take you
into the R file). The Android Java hyperlink works from R file field
declarations too by the way.

This now also works for id attributes defined inline, so if you for
example jump to R.id.Button01, and this will open the first
@+id/Button01 element found in the layout directory.

You can also open non-XML references, such as @drawable/icon. This
will run the Eclipse open command on the icon.

The processing of XML regions is improved, so it will now only
highlight say the value part of an XML attribute, or the name part or
the element tag name part.

Finally, the hyperlink resolvers can now jump into @android resource
files (as found in the SDK data directory). Thus, you can warp into
(say) @android:drawable/alert_dark_frame.

Change-Id: I83fcd1ffb08590f7f587b90f5c64784fe8ce5f67

13 years agoMove to rev 10 and update change log
Xavier Ducrohet [Fri, 10 Dec 2010 22:02:31 +0000 (14:02 -0800)]
Move to rev 10 and update change log

Change-Id: I477033c03a40c52d26b73efa892a65feafaba680

13 years agoMerge "ADT: Fix issue with launch checking manifest debuggable attribute."
Xavier Ducrohet [Mon, 13 Dec 2010 21:44:48 +0000 (13:44 -0800)]
Merge "ADT: Fix issue with launch checking manifest debuggable attribute."

13 years agoADT: Fix issue with launch checking manifest debuggable attribute.
Xavier Ducrohet [Mon, 13 Dec 2010 20:30:20 +0000 (12:30 -0800)]
ADT: Fix issue with launch checking manifest debuggable attribute.

The builds done by the incremental builders now always insert
debuggable=true (unless there's another value already set), so
the check for the attribute at lauch should only test if the
attribute is set to false manually.

Change-Id: Ia0949af16e1650352eb7d52bde3a93bb180b8be2

13 years agoMerge "Add support for including within specific configurations"
Tor Norbye [Sat, 11 Dec 2010 00:19:35 +0000 (16:19 -0800)]
Merge "Add support for including within specific configurations"

13 years agoAdd support for including within specific configurations
Tor Norbye [Thu, 9 Dec 2010 19:35:23 +0000 (11:35 -0800)]
Add support for including within specific configurations

The current support for includes are limited to including a view
within the "base" layouts (defined in layouts/). This changeset
generalizes this to track ALL include-sources (such as an include from
the landscape version) and offers to let you view and edit the current
view within each of those specific configurations.  The configuration
will be switched to one that is compatible with the outer, including
view.  It is possible that this will switch to a different inner view;
that seems better than trying to force editing an inner view in an
outer view that won't actually be shown at runtime.

We should enhance the configuration chooser such that it will only
offer options in its various combo boxes that are compatible with the
inner view as well. That is not addressed by this changeset.

Change-Id: Id5171d367cf65e2403bbac1640a179de4b420bd6

13 years agoMerge "Clean up the api around Layoutlib."
Xavier Ducrohet [Fri, 10 Dec 2010 19:31:23 +0000 (11:31 -0800)]
Merge "Clean up the api around Layoutlib."

13 years agoClean up the api around Layoutlib.
Xavier Ducrohet [Fri, 10 Dec 2010 03:40:29 +0000 (19:40 -0800)]
Clean up the api around Layoutlib.

Move (Style/DensityBased)ResourceValue into layoutlib_api
and make the API use that instead of the interface.
We'll get ride of the interfaces once only obsolete platforms
use them.

In ide-commons also got rid of LayoutBridgeWrapper and moved
the code in LayoutLibrary which does not expose the bridge
anymore, and instead expose an API similar to the LayoutBridge
class.

Updated ADT to use LayoutLibrary directly instead of going through
LayoutLibrary.getBridge(). This allows us to hide some
things like querying the API level and relying instead on
Capabilities (with special handle for legacy bridges).

Also added an error message to LayoutLibrary to display why
it may have failed to load.
Added a check to the API level and don't load layoutlib
that are more recent than the client.

Change-Id: Ie4e615d8d32485ee577bb88e95cd3f562bf590cb

13 years agoMerge "Fix threading issue with layout reload"
Tor Norbye [Fri, 10 Dec 2010 03:03:19 +0000 (19:03 -0800)]
Merge "Fix threading issue with layout reload"

13 years agoFix threading issue with layout reload
Tor Norbye [Fri, 10 Dec 2010 02:48:40 +0000 (18:48 -0800)]
Fix threading issue with layout reload

The layout change listener (which can be called on any thread) must
not access SWT state unless it's on the SWT thread. There were some
existing SWT-redispatch blocks to handle this, but one code path was
missing. This changeset moves the entire method under a single SWT
redispatch block instead.

Change-Id: I7d802d78fbdd4811c68de830e1a54b1a97d76b5f

13 years agoMerge "Remove broken assert."
Xavier Ducrohet [Fri, 10 Dec 2010 00:04:51 +0000 (16:04 -0800)]
Merge "Remove broken assert."

13 years agoMerge "Issue 13051: Use match_parent or fill_parent based on API level"
Tor Norbye [Thu, 9 Dec 2010 23:35:21 +0000 (15:35 -0800)]
Merge "Issue 13051: Use match_parent or fill_parent based on API level"

13 years agoMerge "Add a hyperlink resolved for Android XML files"
Tor Norbye [Thu, 9 Dec 2010 23:22:29 +0000 (15:22 -0800)]
Merge "Add a hyperlink resolved for Android XML files"

13 years agoIssue 13051: Use match_parent or fill_parent based on API level
Tor Norbye [Thu, 9 Dec 2010 22:49:13 +0000 (14:49 -0800)]
Issue 13051: Use match_parent or fill_parent based on API level

Fixes issue 13051: New layout editor always insert "match_parent",
even on older platform.

View rules can now look up the API level of the current project, and
based on that choose to use match_parent or fill_parent when they need
to manipulate the layout attributes.

Change-Id: I861e1f7f7409c40c05b1472268f120806667025c

13 years agoAdd a hyperlink resolved for Android XML files
Tor Norbye [Sat, 4 Dec 2010 21:52:52 +0000 (13:52 -0800)]
Add a hyperlink resolved for Android XML files

This changeset adds basic hyperlink handling to Android XML files
(such as AndroidManifest.xml and layout xml files).

It registers a hyperlink detector for our XML files, and the hyperlink
detector looks up the XML model and finds the node and attributes
under the cursor. If found. it then checks these attributes for a set
of patterns that it can link to:

* If it finds an <activity> element, it looks up the activity name and
  the package on the root element, and lets you jump to the activity.
  Ditto for services.
* If it finds a @layout attribute value, it attempts to open the
  corresponding layout file in the res/ folder in the project.  Ditto
  for other per-file resources like @drawable, etc.
* If it finds a value resource, like @string, @dimen, etc, it will
  search through the various XML files in values/ and open up the
  corresponding XML declaration in the editor with the declaration
  selected.

Note that the resolver does NOT use proper full resource resolution
based on the SDK parsing that we have in use within the layout editor
etc. That's the natural next step.

Change-Id: I5880878fe67f26fb8d3b08b808c02baa1049f2c5

13 years agoRemove broken assert.
Xavier Ducrohet [Thu, 9 Dec 2010 20:10:42 +0000 (12:10 -0800)]
Remove broken assert.

The assert can be false in normal condition.

Change-Id: I7181556e3ba32f765eca8e14997622557402a2da

13 years agoMerge "Fix the build by putting a missing LOCAL_MODULE_TAGS"
Jean-Baptiste Queru [Thu, 9 Dec 2010 19:30:19 +0000 (11:30 -0800)]
Merge "Fix the build by putting a missing LOCAL_MODULE_TAGS"

13 years agoMerge "android.el: Make android-uninstall-app not reinstall"
Raphaël Moll [Thu, 9 Dec 2010 19:23:17 +0000 (11:23 -0800)]
Merge "android.el: Make android-uninstall-app not reinstall"

13 years agoFix the build by putting a missing LOCAL_MODULE_TAGS
Xavier Ducrohet [Thu, 11 Nov 2010 23:14:52 +0000 (15:14 -0800)]
Fix the build by putting a missing LOCAL_MODULE_TAGS

Change-Id: Ie5cdd59663ef469204f693c888231a2476d954f4

13 years agoandroid.el: Make android-uninstall-app not reinstall
Richard Lowe [Thu, 9 Dec 2010 16:13:00 +0000 (11:13 -0500)]
android.el: Make android-uninstall-app not reinstall

- uninstall, rather than reinstalling the app
- Fix reference to argument

Change-Id: I66afe170c1d0ce2e5acfccf7a0c635fd07764f32

13 years agoMerge "Add Ant version check in setup task."
Xavier Ducrohet [Thu, 9 Dec 2010 02:06:17 +0000 (18:06 -0800)]
Merge "Add Ant version check in setup task."

13 years agoMerge "Add swingworker back to the sdk."
Xavier Ducrohet [Thu, 9 Dec 2010 01:34:20 +0000 (17:34 -0800)]
Merge "Add swingworker back to the sdk."

13 years agoAdd Ant version check in setup task.
Xavier Ducrohet [Thu, 9 Dec 2010 01:32:19 +0000 (17:32 -0800)]
Add Ant version check in setup task.

Change-Id: Id2237ae2fd64a1ccae5b1a1957099c218cdaf9a5

13 years agoAdd swingworker back to the sdk.
Xavier Ducrohet [Thu, 9 Dec 2010 00:44:57 +0000 (16:44 -0800)]
Add swingworker back to the sdk.

Needed by draw9patch

Change-Id: I677e4ba5230aa5a8bfc1d497ec2381131c3940d7

13 years agoMerge "Include View Support"
Tor Norbye [Wed, 8 Dec 2010 23:24:46 +0000 (15:24 -0800)]
Merge "Include View Support"

13 years agoMerge "Improve test apps to make them easier to use."
Xavier Ducrohet [Wed, 8 Dec 2010 23:05:08 +0000 (15:05 -0800)]
Merge "Improve test apps to make them easier to use."

13 years agoMerge "ADT: Update changelog for ADT 8.0.1"
Xavier Ducrohet [Wed, 8 Dec 2010 23:05:01 +0000 (15:05 -0800)]
Merge "ADT: Update changelog for ADT 8.0.1"

13 years agoMerge "Fix test apps using a library"
Xavier Ducrohet [Wed, 8 Dec 2010 23:04:54 +0000 (15:04 -0800)]
Merge "Fix test apps using a library"

13 years agoImprove test apps to make them easier to use.
Xavier Ducrohet [Wed, 8 Dec 2010 00:31:31 +0000 (16:31 -0800)]
Improve test apps to make them easier to use.

Each app now properly reference its name in layout output and
in launcher activities.

Change-Id: If404b61afc4eb193b01c2b4f8ef44194f5726d93

13 years agoMerge "Cherry-pick 0ec90f2b from tools_r8"
Xavier Ducrohet [Tue, 7 Dec 2010 23:29:43 +0000 (15:29 -0800)]
Merge "Cherry-pick 0ec90f2b from tools_r8"

13 years agoMerge "Cherry-pick 231ec810 from tools_r8"
Xavier Ducrohet [Tue, 7 Dec 2010 23:29:25 +0000 (15:29 -0800)]
Merge "Cherry-pick 231ec810 from tools_r8"

13 years agoCherry-pick 0ec90f2b from tools_r8
Raphael Moll [Tue, 7 Dec 2010 04:32:05 +0000 (20:32 -0800)]
Cherry-pick 0ec90f2b from tools_r8

Display output error in the exception's toString..

Change-Id: Idce557d2c172d27abaf474d14136f48d7c3396dc

13 years agoCherry-pick 231ec810 from tools_r8
Xavier Ducrohet [Tue, 7 Dec 2010 04:23:28 +0000 (20:23 -0800)]
Cherry-pick 231ec810 from tools_r8

Improved error message during export.

Change-Id: Ic4b0bf8cfbf59b70a797a31036eb9204481e29d9

13 years agoFix test apps using a library
Xavier Ducrohet [Tue, 7 Dec 2010 23:18:29 +0000 (15:18 -0800)]
Fix test apps using a library

Change-Id: I173e7728db86f01d15067555b936e90c4687347d

13 years agoADT: Update changelog for ADT 8.0.1
Xavier Ducrohet [Tue, 7 Dec 2010 20:16:53 +0000 (12:16 -0800)]
ADT: Update changelog for ADT 8.0.1

Change-Id: I7133aa293b2d1e0ef3ba65f8ec91fb95cda4ee66