| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The IDE-side implementation of the IClientRulesEngine interface was
nested within the RulesManager class, and has grown a lot over
time. This changeset moves it out as its own top level class. There
are no semantic changes, just a straightforward refactoring operation.
Change-Id: Ica072e8f7a06b822c6bde28e37b10ec86e05a402
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We had a number of constants for attribute values which had the prefix
VALUE_ but which were really attributes and should have the prefix
ATTR_. We already had the equivalent ATTR_ constants, so get rid of
the VALUE_ constants and clean up the usage slightly.
Change-Id: Icc0f0ad8910695b4ac4904c620f73d6cf4bcacba
|
|/
|
|
| |
Change-Id: If307659aabe37c5204f7e40c10fc93576de0e145
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL moves the various rendering-related code in
GraphicalEditorPart into a separate RenderService class, which can be
configured for different purposes:
- Rendering a layout shown in the canvas
- Rendering palette previews
- Rendering a preview of a node during a drag from a palette
- Rendering a theme drawable
- Rendering layout-only to measure preferred sizes
Once configured, the rendering service can be used repeatedly and off
the UI thread to for example render all the palette previews without
blocking editor startup. This will be addressed in a follow-up CL.
Change-Id: I851148d80c3a4dc9e4b5b66c9838ae49809ea03c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RelativeLayout now has both drop/move and resize guidelines, and
existing constraints are visualized for the selection.
LinearLayout resizing now uses weights to change the size of nodes
rather than setting width/height.
All resize operations offer guidelines to snap to their "wrap_content"
size.
Various bug fixes in related areas as well.
Change-Id: I817e34c6e67ce61cfb137eb067076d91f69f99e9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds "resizing" support to the layout editor.
First, the normal selection overlay is replaced with a selection
rectangle which also has "selection handles" in the corners and in the
middle of each edge. Moving the cursor over one of the selection
handle will show a directional resize cursor, and dragging the handle
will initiate a new resizing gesture. (This also made it possible to
remove the selection fill we've used until now, so the layout editor
will "interfere" less with the visual look of the layout.)
During the resizing operation, the current size is displayed in the
Eclipse status bar.
The resizability of widgets is determined by metadata, so for example
a ZoomControls widget is not resizable, a rating bar is only
horizontally resizable, a TableRow is only vertically resizable, and
most widgets are resizable in any direction.
The parent layout is involved in the resizing operation. Currently,
the resizing gestures will only update the width and height properties
(except for absolute layout, which will also set the x and y
properties if you are dragging a left or top edge). In a follow up
changeset this will be extended to for example make RelativeLayout
allow resize dragging to snap to new edges and the resize will be
applied as a set of new constraints on the "resized" widget. Thus,
you'll be able to drag the right hand side of a widget and drag it
over to attach to some other widget or edge, independent of what the
left edge or vertical edges are bound to.
This changeset also adds the ability for ViewRules to provide a
message or error message back to the IDE during a drag or resize
operation. For resizing this is used to display the new size. However,
it is now also used to display more useful messages in a couple of
older scenarios:
* Attempting to drag anything into a ListView will display a message
that AdapterViews much be configured via Java code
* Attempting to drag anything into or within an AbsoluteLayout will
warn that AbsoluteLayouts are deprecated.
Note that resizing will currently set the size to specific pixel (dip)
sizes. In the next changeset I will add guidelines which (in addition
to those described for RelativeLayout above) will add guidelines for
significant sizes such as the parent size, the preferred
(wrap_content) size of the widget, and possibly other hardcoded sizes
in the same layout.
Change-Id: Ie4f3367e81b24259a106c649c944008f4a3d31ec
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the sdkmanager now contains separate windows for
the "SDK Updater" versus the "AVD Manager", the various
UpdaterWindow classes are renamed to SdkUpdateWindow.
We already have now a standalone AvdManagerWindow that
matches this pattern.
This is a pure refactoring/renaming CL with no workflow
change whatsoever.
Change-Id: I18ecb6aa33b7e9bd2294a959b371b424d03b2060
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After applying it, please run the Eclipse's Externalize Wizard at “Source -> Externalize Strings…”. This ensure that hard-coded strings added between the time the patch was created and the time it was integrated will also be externalized.
From the time this patch is integrated on, each new string created in the plugin
should be added to the following files:
eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/i18n/messages.properties
Example: JavaClassName_MessageID=<string value>
<string value> refers to the string itself.
eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/i18n/Messages.java
Example: public static String JavaClassName_MessageID;
In the Java class, the new string should be referenced this way:
Messages.JavaClassName_MessageID
Related patches: All patches with the [EXTERNALIZATION] tag
Changes after review:
Code formatted according using android code formatter template
Merged Strings DeviceView_Unable_Create_HPROF_For_Application and DeviceView_Unable_Create_HPROF_For_Application.
Removed Motorola copyright notices.
Change-Id: Id889db593ef313760515f28b5973d3a9a8ad80d0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When picking the default render target, we attempt to pick a render
target that is at least version 5 of layoutlib (where rendering
fidelity has improved significantly, where include support is
improved, etc.)
However, this sometimes picked a render target whose API level is
lower than the project target.
This CL fixes that problem, and also improves the detection of
compatible layout libraries to not only consider API level 11 or
higher, but also the new layoutlib API property which will identify
qualified SDK versions when we release backported versions of layout
lib.
Change-Id: I4d4159389692d984a66856eeb80035a8e8b7d1cf
|
|
|
|
| |
Change-Id: Iebc29d774747ba64f1f895cd36970330145fd6b4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During addon parsing, the SDK Manager will detect whether the addon
has:
- data/layoutlib.jar
- data/res/
- data/fonts/
if the first one is present, then it is used during rendering.
if *both* the 2nd and 3rd ones are present, then addon resources
are used during rendering.
On the GLE side, all that's needed is adding addons to the list
of rendering targets if they have either library or resources (or
both).
Change-Id: Id16925eea2c98b9fbaaa884ac6fd8c1c1c444db2
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ADT's AddCompatibilityJarAction defined 2 new generic
useful methods, copyFile and isSameFile. SdkLib already
had an OsHelper.copyFile, so I moved that class to a
more generic sdklib.io package and added the new method
isSameFile.
Another suitable candidate would have been io.FileWrapper
in the common project.
Change-Id: If310e09af112c5f4d87a253b35e67e4f5adb34da
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is a method in the layout editor which fills in required default
attributes like id, width and height, as well as some optional
attributes like a default text attribute.
This code was called unconditionally whenever a new child is added to
a layout. However, this should only be done when a new widget is
created, not during moves or copies from existing elements.
Change-Id: Ic04dec746c70359eca38454bacfdcdb87891719f
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ListView palette preview requires adapterview support in layoutlib,
and DatePicker and TimePicker require Holo themes on Honeycomb. This
changeset adds some conditional logic to the palette preview code to
drop rendering of these widgets based on the current render target,
layout library and theme.
Change-Id: Ic42a40faf817e60525485e0a46b7ad967ed1c363
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changeset moves the project-themes in the combobox up above the
framework themes, since
(a) it's likely that the user wants to frequently choose these, and
(b) the list of project themes is usually much smaller than the
framework list, so it brings these items up to the visible part of
the combo
Change-Id: Idb989d388f5cb1f5cc6a302a6c5796db69e78c8e
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If you open a layout designed for a particular theme in another theme,
you can get many confusing error messages. Instead of "attribute
missing" it may tell you that it failed to convert a resource to a
color or drawable, and so on.
To help guide users to the root problem (wrong theme chosen) this
changeset detects the scenario where theme attributes can't be
resolved, and when these are found the top of the error log will start
with a bold message stating that theme resources were not found and to
check whether the correct theme is chosen.
To do this, the resource resolver emits a new sub-type of the resource
missing tag into the error log, which is used in the IDE to prefix the
errors with the special error message.
Change-Id: Ic29c9af37da4b5cc2c9fb1ca5670c8b8f79bf852
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: I3f55c21f79ad66bed1329a2f5882deb94e93be62
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The SDK Manager 2 should not try to change the
menu bar when invoked from Eclipse. Actually it
can't because the SwtMenuBar lib isn't even present
to it crashes with a NoClassDef exception.
This CL adds the notion of "invocation context" so
that we know what is invoking the manager and we can
change the UI accordingly.
Change-Id: I606850a20fbc5f9d2d1d4fd0e16aa0bd71ef41c7
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset changes the popup displayed when you drop a fragment
tag in a pre-API-11 project. Instead of just displaying an error
message, you now get a dialog which asks if you want to install the
project, and if you click the "Install" button it invokes the SDK
manager to install the right package, and then copies it into the
project.
In addition, the fragment selector now has a "Create New" action which
invokes the New Class wizard pre-configured with the right fragment
class.
Change-Id: I4ce1b51fbfe939a21e91379eb6b77ff722c13f0f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
As a working case example, this adds an ADT project
context menu to add the Android Compatibility JAR
to an android project.
Change-Id: Icd86930b72558240dc9f5a6f732478253b8cb0fb
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Ic53c7174d4ed74b94cc24680e00737ddeaad024b
|
|/
|
|
| |
Change-Id: I19d2a3c9c6802b3e1c065ca36828d2b672130630
|
|
|
|
|
|
|
|
| |
GridViews are another AdapterView subclass. This changeset adds
preview support for GridViews by modifying the ListView preview
support to also accommodate GridViews.
Change-Id: I5af0a4c7e270cfa23c609be316d01dfb188a051b
|
|
|
|
|
|
|
|
|
| |
A change that was cherrypicked from the external master into the
tools-r11 branch was automerged back into the external master in such
a way that a method and a field got duplicated. This CL fixes the
merge.
Change-Id: I5b05c8a9477b4afb669efd1904c1415925d25307
|
|\
| |
| |
| | |
Change-Id: Ic374b2d4185f1c3c4dbad2ea81b901fe9b07666a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset adds a couple of focus related changes:
1) When the first text field is added into a layout, it is
automatically requesting focus
2) There is a new context menu item available on textfields to request
focus. When invoked on a text field, it will both add
<requestFocus> to itself and remove it from any other text fields
that have set it in the layout. When invoked on a text field which
already has focus, it will offer to clear the focus.
3) The Advanced section of the palette also contains the
<requestFocus> tag.
Change-Id: Ie9e1ab07c4f7ea701e9fac17f6c82e52656bc755
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This change contains the workaround for
http://code.google.com/p/android/issues/detail?id=15003
For details,
see http://code.google.com/p/android/issues/detail?id=15003#c50
Change-Id: I6485d32620a23c17879922155a8cfb6e4290f05e
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The code to open a file (called by Go To Declaration, Show Include
etc) handles two scenarios:
(1) The file is in the workspace - open using Eclipse IFile mechanism
(2) The file is outside the workspace - open using the fallback
external storage (which means you get a plain XML editor)
There's a third scenario: the file is not in the workspace, but is
part of a project in the workspace so it does have a valid IFile.
(This can happen if you import a project but choose not to copy the
contents into the workspace). This changeset adjusts the code to open
up an editor such that it handles this third scenario and we get our
own XML editors for these types of files.
Change-Id: I040e1b899cd38bbda3fcf3475cc4dfb541d10016
|
| |\ \ \
| | |/ / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This changeset adds designtime-previewing of fragments, where
a layout which contains fragments will show the contents of
the fragments inline.
Initially, the fragments are empty, but you can right click on them to
bring up a context menu where you can choose which layout to show at
designtime. This is persisted across IDE sessions, just like the
ListView render preview.
In addition to the generic layout chooser, all layout references found
in the associated Fragment class (usually what you want) are listed
directly in the menu.
Change-Id: Iff3e6e5cbf87a19bdb61e677a63f663ca6e4848b
|
| |\ \ \
| | |/ / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This changeset adds preliminary support for fragments:
* Add <fragment> to the palette, along with a drop handler which pops
up a class chooser to pick the Fragment class; all project
implementations of android.app.Fragment and
android.support.v4.app.Fragment are listed.
* Adds a fragment descriptor such that code completion works for
<fragment> elements
* Fix project callback such that it does not complain about a missing
class "fragment".
* Fix outline to display the name of the fragment rather than the
fragment tag name.
* This changeset also centers the label in MockViews since those are
still used to render fragments
Conflicts:
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/descriptors/LayoutDescriptors.java
Change-Id: I6f39f0c29a0cf21799fa8a55406eeae1e3beb57f
|
| |\ \ \
| | |/ / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/LayoutConstants.java
Change-Id: I5260aacb7d7a14141f43d9a65bb4bb87627d17c2
|
| |\ \ \
| | |/ / |
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
First and foremost, allow custom views to accept children such that
you can drag & drop children into the custom view in the outline.
Second, prevent an NPE which can occur if you drag into a layout where
the root element is a custom view.
Third, handle <view> (not <View>) better: provide a custom icon, and
inline the view class name in the outline label.
Fourth, allow double clicks (in addition to ctrl-click which is already
supported) on the custom views in the palette to allow jumping to the
custom view code.
Change-Id: I13c2bf2f4169185c9fcc893ce487f2abdac46802
Conflicts:
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/descriptors/LayoutDescriptors.java
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Escape any single or double quotes inside the string
value definition in strings.xml:
This'll work => "This'll work"
Escape '" => Escape \'\"
Change-Id: I21cb506e10e837feb0e435a21cb50aaa5342f0fa
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add baseline/margins to ViewInfo.
Also make it so that older layoutlib that are using API5 return the
value through reflection (done in LayoutLibrary.)
Change-Id: Ied102625430b53f9b5e62aa738c8c598054cc266
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The feature to convert a Java Project into an
Android Project is broken. It's also quite irrelevant
now since project are better created using the NPW.
SDK Bug: 3259855
(cherry picked from commit 7f8f80cfe2a29b7ebaf139fb4228ad31192fb8a9)
Change-Id: Ifb5e93d2dcf6853136cd4add5e4af6b14fafec35
|