aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.tests
Commit message (Collapse)AuthorAgeFilesLines
* Make ADT use the new layoutlib API.Xavier Ducrohet2010-11-114-68/+19
| | | | | | | | | | | | | | | | | | | | | | ADT now exclusively use the new API. The older platforms that still use the old API are accessed through a compatibility layer provided by the class LayoutBridgeWrapper that converts the old to the new API (both input and output). The wrapper and the loading code for the bridge have moved to layoutlib_utils, but into the ide.common package. Layoutlib_utils is to be renamed ide-common later. .sdk.LoadStatus has moved into .ide.common too since it's used by the bridge loading code. As we'll move more code into ide-common it's ok to have it there anyway. Also did some minor fix to the API: - missing implementation of ViewInfo - Made a singleton for SUCCESS state of SceneResult. Change-Id: I5e7130ca03b92ad71dc9c293b2ffc40566df645c
* Add transient visibility mode for empty containersTor Norbye2010-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you add a new container, such as a LinearLayout, it is usually invisible. The reason for this is that an empty layout has 0 width and 0 height. There are two existing features in the layout editor to deal with this: (1) Outline mode, which renders rectangles around all views, and (2) Padding mode, which adds 10 pixels of padding to all views. In combination, these two modes will create a rectangle for empty layouts making them visible and user-manipulatable -- you can for example select or drop into them. This changeset attempts to make dealing with these types of containers easier and more discoverable. It adds a new temporary mode where empty containers (and only empty containers) are automatically padded and have their outlines painted. And more importantly, this is only done in some limited scenarios: When you drag into, or drag within, the layout canvas. As soon as you finish the drag, empty containers disappear again. Unlike padding mode, we don't enlarge the design surface itself, since this mode comes and goes easily and frequently. In addition to this, there is special handling for selection. If you select a zero-sized element (which for example is automatically done when you drop a new layout, and which can also be done by clicking in the outline), then the element is also revealed similar to the show-empty mode, but in this case only the selected item and not any other invisible containers are shown. Change-Id: Ibf3ec6a080a50a8f0f55919c3d3e6c4d2890468d
* New layoutlib API.Xavier Ducrohet2010-11-091-0/+4
| | | | | | | This is the new API to move to a stateful layoutlib, allowing for faster actions on an inflated layout. Change-Id: Ice6324c056efc6e82d5760b5f4e3d40b58938368
* Add gesture support, marquee selection, and refactoringTor Norbye2010-11-043-0/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This checkin adds support for gestures and overlays. Gestures are sessions of mouse/keyboard activity, and this is documented in the javadoc for the new Gesture class. Overlays are units of graphics, and these are documented in the Overlay javadoc. The gesture architecture lets us isolate the logic for each different type of operation (marquee, resize, move, etC), and with associated overlays we don't attempt to for example paint drag feedback during a resize operation, etc. The checkin also adds marquee selection (as a second gesture, in addition to the existing drag & drop based move gesture), along with some associated changes in how the root view is treated. As part of isolating the mouse handling and painting related to gestures, painting etc., I also refactored the code quite a bit. LayoutCanvas which used to be a large class has been split into a number of new classes, one for each area of responsibility: - The mouse listener and drag & drop code has been moved into a GestureManager. (A lot of the drop handling code also came from the CanvasDropListener class.) - Code related to maintaining the set of rendered views, and performing searches in the views, has been moved into a ViewHierarchy class. - Code related to selection has been moved into a SelectionManager. - Various individual painting pieces (outline, hover, etc) have been moved into individual Overlay classes such as OutlineOverlay, HoverOverlay, SelectionOverlay, etc. This also moved associated resource allocation and cleanup into the overlays. - New coordinate classes, ControlPoint and LayoutPoint, are used instead of ints and plain Points to make it really clear which methods require coordinates in the layout (such as the ViewHieararchy search methods) and which ones require coordinates in the canvas control (such as paint methods). There are factory methods to automatically construct the right kind of coordinate from different types of mouse events, as well as methods to convert between the two. I also tweaked the visual appearance of selection a bit more, and some other misc cleanup. Change-Id: I666aabdcd36720bebe406b68237e8966d985fb8f
* merge from tools_r8The Android Open Source Project2010-10-273-10/+28
|\ | | | | | | Change-Id: I90eeb2def2e3d3f0ee6f34b0a3f710f966808a7a
| * ADT: support synthetic parent chains in attrs_manifest.xmlRaphael Moll2010-10-273-10/+28
| | | | | | | | | | | | SDK Bug: 3125910 Change-Id: I00450b13d10cbe4f32cbfbd6e1945985b599920f
* | merge from tools_r8The Android Open Source Project2010-10-273-0/+135
|\ \ | |/ | | | | Change-Id: Id7dbdfae280b98547f9a80e07cc5d80d7f9f92f7
| * Merge "Fix resource issues in ADT." into tools_r8Xavier Ducrohet2010-10-273-0/+135
| |\
| | * Fix resource issues in ADT.Raphael2010-10-273-0/+135
| | | | | | | | | | | | Change-Id: I744833ec03d0d379ea526c193549f99f25f6811a
* | | merge from tools_r8The Android Open Source Project2010-10-273-13/+254
|\ \ \ | |/ / | | | | | | Change-Id: I907004c9f3c55a7e454e0bca644fa4efe200f15b
| * | ADT: Separate manifest test for AttrsXmlParser.Raphael Moll2010-10-273-13/+254
| |/ | | | | | | Change-Id: I8ea1a31fd7db849fffb9043c58a91f82444d98d4
* | Support 3rd party layout rule loading, and rip out Groovy supportTor Norbye2010-10-2611-406/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for loading 3rd party .jars providing additional layout rules. This can be configured by adding a property referencing the jars to be loaded as part of your build.properties, like this: default.properties: ... layoutrules.jars=chart-rules.jar:graph-rules.jar ... This will create a class loader referencing chart-rules.jar and graph-rules.jar (as well as the visual editor's plugin class loader as a fallback), and this class loader is used to load IViewRule implementations. In addition, this plugin rips out the various remaining Groovy hooks and references that were earlier used to load Groovy scripts as layout rules, and removes groovy from the load path and build symlinking scripts. Change-Id: Ia17a60259559ec86270726add258382a879117dc
* | Add layout unit testsTor Norbye2010-10-2514-0/+1721
| | | | | | | | | | | | | | Add layout unit tests, and some infrastructure for testing. Also fix some formatting errors (>100 column lines) in the previous commit. Change-Id: I3eabf30998ab7deb84df57e4d0c10cf57ee399d5
* | Port layout rules to JavaTor Norbye2010-10-226-7/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had a number of layout implementations in the tool written in Groovy; these were hard to deal with because of lack of good tool support (debugging didn't work, refactoring didn't work, code completion didn't (always) work, go to declaration didn't work, semantic checks like unused code didn't work, etc. etc.) Since these layout helpers are only getting larger, replace them by equivalent Java code to make development easier. This checkin also moves the API classes formerly used by Groovy scripts into a new package (next to the Java layout rules) under com.android.ide.common (api and layout) since this code isn't Eclipse specific and could be used by other IDE vendors. These interfaces were left identical (only the package statements and directory location changed), with two exceptions: I added a new method called "in" to IAttributeInfo.java, and I added a parameter to IViewRule's onInitialize method. The Groovy code was kept as close to the original as possible; I copied in the Groovy code, and then replaced the Groovy-specific constructs (closure-iteration on collections, literal map syntax, etc) with equivalent Java code. The only tricky part was ensuring that Groovy's handling of the == and != operators were translated into .equals calls. Change-Id: Idf7660ddea3766eac0a4a65ce6524d3f5119f7b2
* Fix ddmlib test run failure and metric reporting.Brett Chabot2010-09-302-2/+4
| | | | | | | | | | | | | | | This submit fixes two bugs: 1) Test run failures were not getting reported correctly in some scenarios, and in others testRunFailed was being called before testRunStarted was called. With this submit, the order of ITestRunListener callbacks is documented and strictly adhered to. 2) test metrics were getting reported for regularly occuring instrumentation output such as 'stream' and 'id'. Also cleaned up the associated unit tests and changed them to use easymock. Change-Id: I4cee3abebdf1c607ac1dc51a240c92ca9611ca31
* Move plug-ins version to 8.0.0 to match r8Xavier Ducrohet2010-09-031-1/+1
| | | | Change-Id: Ia186695240e5f641c517a31ae93100143fc42694
* Merge "Allow adt-tests to access package-private elements."Brett Chabot2010-08-233-81/+7
|\
| * Allow adt-tests to access package-private elements.Brett Chabot2010-08-213-81/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously when running tests in the continuous tests system, adt-tests could not access any package-private elements in adt. This was because adt-tests was a separate plugin and thus had a separate class loader. With this commit, adt-tests is now a fragment, and its code runs inside the adt plugin. Bug 2179353 Change-Id: Iec8c08bed2fa116b38490a774cd3bd6f4c7358a5
* | Disable tests using EasyMock to fix build.Raphael Moll2010-08-211-30/+28
| | | | | | | | | | | | We'll try to fix it in another CL later. Change-Id: I3a0c5131e6e9398a657081a639fbfd6aa670ba97
* | ADT GLE unit tests.Raphael Moll2010-08-192-6/+74
|/ | | | | | | | | There isn't as much as would want to here. I need to refactor the RulesEngine to make it more testable, the major block is that it uses the static AdtPlugin to find the groovy files path and that doesn't exist in the UT. Change-Id: I96c0821252d5b777665ed68153fde63d140d0ee5
* ADT-Tests: Unit test for GRE NodeFactory.Raphael Moll2010-08-161-0/+177
| | | | Change-Id: I33039b0be05f0eca51f1fd5c6f616d01f46a59b7
* ADT-Tests: add external/easymock to the classpath.Raphael Moll2010-08-161-0/+1
| | | | Change-Id: I892f686b98efad14ac5de932030238116bf0d3d4
* ADT GLE2: minor unit testsRaphael Moll2010-07-282-0/+404
| | | | Change-Id: I231b272363bf1d9652093c747fd2db865f1658c7
* Fix EclipseTestCollector for Eclipse 3.6's JUnit lib.Raphael Moll2010-07-231-14/+30
| | | | | | Some method signatures have changed. Change-Id: Iff11d8bc3ba670a59491f0b5ba50de8bad79c1bf
* Fix QualifierListTest and ConfigMatchTest unittests.Raphael Moll2010-07-231-6/+27
| | | | | | | | | | testQualifierList() checks the number of qualifiers against FolderConfiguration.INDEX_COUNT except there's a mismatch since there was no index 13. ConfigMatchTest was missing the new dock/night and nav state. Change-Id: I5df0b1375a209cca5a39d93946b62b88f2688fb2
* ADT: dock/night combos in layout editor.Xavier Ducrohet2010-07-082-15/+81
| | | | | | | | | | | | | | | | | | | | | | Added proper support for qualifiers that have fake values like "__" for language/region or "none" for dock mode. Those are used by ADT internally but do not represent valid values, so some UI (like the config creator) must handle them. They didn't do it before which led to some weird UI behavior such as a language or region qualifier with "__" value. Added some missing icons. Clean-up some qualifiers by moving similar code into a base class for enum based qualifiers Removed dependency on the current IAndroidTarget to get the folder segment corresponding to a qualifier as it's not needed anymore now that targets use recent versions of aapt (and will move to using the most recent one soon). Change-Id: I29c7bb5a7783db1696f53d0e38f46f64671e5e0d
* Make ddmlib/ddmuilib jar files inside the ddms plug-in instead of symlinks.Xavier Ducrohet2010-06-241-4/+6
| | | | | | | Also cleaned up the abstraction layer to load images from ddmuilib since its image are now always located inside ddmuilib jar. Change-Id: Id9d283df18a05b7b5593e4593e90dac6e5548b94
* ADT GLE2: drag'n'drop for LinearLayoutRaphael Moll2010-06-171-43/+76
| | | | Change-Id: I64959e27f2c08c459e15323d7c8d2cdb041ba9dd
* Fix adt-tests (broken by last ADT GLE2 AttributeDescriptor change)Raphael Moll2010-06-112-12/+22
| | | | Change-Id: I7b494743c2b7e8c2bfd6a89cc031f7eb3989ea6c
* ADT GLE2: Restore relative position of elements in AbsoluteLayout drop.Raphael Moll2010-06-041-87/+117
| | | | | | | | Change the IDragElement to not carry the original INode, since this is not available when crossing Eclipse instances. Instead encode the info we need in the transfer. Change-Id: I90a1e71171af61e51e8aaded31e05300fa85c014
* ADT GLE2: Tests for SimpleElement/AttributeRaphael Moll2010-06-043-0/+457
| | | | Change-Id: Ica08b71b4d3280fefad2388780849d307a515d5a
* Add parsing of <uses-configuration> in the manifest.Xavier Ducrohet2010-05-181-1/+1
| | | | Change-Id: Id6f4b58c5a811b0b7e32b40162c8bd6680f2fc67
* move the resource enums from the qualifier classes to sdklib.Xavier Ducrohet2010-05-189-54/+45
| | | | | | This is so that other code (like the manifest parser) can use them. Change-Id: I53be59bbe752e77752e90cedb528f25cf3b3792f
* Refactor the manifest parser test in the correct package.Xavier Ducrohet2010-05-173-160/+0
| | | | | | | | And don't make it use the Parser Helper that's eclipse specific. Also fixed the versionCode parsing (bug introduced in previous CL) Change-Id: Ie472d7d6c4847e3fae660873cca7d71e801a2a34
* Minor refactor, moving ManifestData out of the parser class.Xavier Ducrohet2010-05-141-5/+14
| | | | | | Also started added new data parsing (screen support) Change-Id: I783e973fa16598a777eec4536746e6e5b9cb3e74
* Refactored the Android Manifest into sdklib.Xavier Ducrohet2010-05-125-15/+27
| | | | | | | | | | | | | | | API change to make it use IFileWrapper instead of IFile. Old AndroidManifestParser changed to AndroidManifestHelper which is now mostly wrapper methods to add Eclipse specific parameters. Also moved ADT...AndroidConstants.CLASS_* to sdklib...SdkConstants (needed by the parser) and removed AndroidConstants.FN_ANDROID_MANIFEST since SdkConstants.FN_ANDROID_MANIFEST_XML existed too. Moved the Eclipse implementation of IAbstractFile/Folder Change-Id: I59bdbe90ba9a4c0b5bb2c4c68945b8877d4eed3d
* move to Tools r7 and ADT 0.9.8Xavier Ducrohet2010-04-011-1/+1
| | | | Change-Id: Ia7690ff2787aa68bb668af05bbaf13a7cf16bc8b
* ADT: Make ProjectResources include the libraries resources.Xavier Ducrohet2010-03-022-3/+2
| | | | | | | | | | | This is only needed for the layout rendering so we restrict this to getConfiguredResources since it's called for every rendering anyway (and only there). Still need to trigger new rendering when a library resource changed. Change-Id: I2241c84626cbafaefc51db3718be54a4937d0657
* Move sdklib.internal.io.* into sdklib.ioXavier Ducrohet2010-02-242-2/+2
| | | | | | | Some other "public" API (AndroidManifest) depends on it so it should be public too. Change-Id: I88cd299bbd60df8f4dac5fe029bb52c0c0c2f16c
* Improve the IAbstractFile/Folder classes.Xavier Ducrohet2010-02-231-2/+3
| | | | | | | | - Add setContent to the file class - add listMembers to the folder class - extend java.io.File instead of using a delegate. Change-Id: Ib6434b37c8cceb6661bc6a17ae678a56d2c243f2
* ADT: Library support: source folder and pre-compiler.Xavier Ducrohet2010-02-233-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first step in the library support. For each library, create a source folder in the main project that is linked to the source folder of the library project. The linked resources use a path variable named after the library in the format: _android_<library name>. These variables are always created when the link is created. For now the link is recreated all the time, but we could do a check and not redo it if it's already done. Additionally, the pre-compiler creates the R class from the res folders of the main and library projects. Some misc fixes/clean-ups: * Fix an issue with the new ProjectState where opening a project would not trigger a load of its target data. * Changed the lock for all SDK operation: - moved the lock in Sdk accessible as Sdk.getLock() - made the few Sdk method that used their own synchronize block use the same lock as all others. * removed the builders project and moved its content to sdklib This was meant as a way to share code between the Eclipse builders and the Ant tasks but sdklib is already used by both, so it's better to put the code in sdklib than have yet another project. Change-Id: Ibfa449c7a809f28e428c03bbda8215969717ecde
* Check whether the project's target supports libraries.Xavier Ducrohet2010-02-161-1/+0
| | | | | | | | Check is done when: - a library is added to a project through "android update project" - a project is compiled through Ant Change-Id: I09993b9aac5ad32a84335647429fc52fa2babaf9
* Merge remote branch 'goog/master' into HEADXavier Ducrohet2010-02-123-3/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: eclipse/plugins/com.android.ide.eclipse.adt/.classpath eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF eclipse/plugins/com.android.ide.eclipse.adt/build.properties eclipse/plugins/com.android.ide.eclipse.tests/.classpath Change-Id: I4013ba2d22e5b602329534ff602c7a7e7ce38567
| * New "builders" project for common code to Eclipse and Ant.Xavier Ducrohet2010-02-124-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This new project will contain build specific code used by both the custom Ant tasks and the Eclipse builders. The first code to go in there, is the IAbstractFile/Folder classes already used by Eclipse as an abstraction layer for file/folder access when some code needs to use both the Java IO API and the Eclipse resources API. The builders project include the implementation for the Java IO, while the Eclipse implementation is in ADT.
| * Update prebuilt Groovy JAR to 1.7.0Raphael2010-02-113-3/+3
| | | | | | | | | | | | Depends on Change Ie2684212 Change-Id: I3c269c7e972b8fcb207409732c450fab1544b508
* | New "builders" project for common code to Eclipse and Ant.Xavier Ducrohet2010-02-124-5/+2
|/ | | | | | | | | | | | | | | This new project will contain build specific code used by both the custom Ant tasks and the Eclipse builders. The first code to go in there, is the IAbstractFile/Folder classes already used by Eclipse as an abstraction layer for file/folder access when some code needs to use both the Java IO API and the Eclipse resources API. The builders project include the implementation for the Java IO, while the Eclipse implementation is in ADT. Change-Id: I93d07117678000531bd17540b1ccddca8edb86ad
* am 99d9b70c: am cb2261e8: Merge "Fix ADT Build. ExplodedRenderingHelperTest ↵Xavier Ducrohet2010-01-281-3/+2
|\ | | | | | | | | | | | | | | | | was not updated to the new API of ExplodedRenderingHelper" into eclair Merge commit '99d9b70cc91bc55fad415c7fdb891df90aa048d9' * commit '99d9b70cc91bc55fad415c7fdb891df90aa048d9': Fix ADT Build. ExplodedRenderingHelperTest was not updated to the new API of ExplodedRenderingHelper
| * Fix ADT Build. ExplodedRenderingHelperTest was not updated to the new API of ↵Xavier Ducrohet2010-01-261-3/+2
| | | | | | | | | | | | ExplodedRenderingHelper Change-Id: I987004d3869f9e2f94efb0bec1f92f55a8c42501
* | am cf68c35f: am aae21fc0: Merge "ADT/GLE: Support more layouts in explode ↵Xavier Ducrohet2010-01-281-0/+257
|\ \ | |/ | | | | | | | | | | | | | | mode." into eclair Merge commit 'cf68c35f51388b6764615a16a9585561b360b0b4' * commit 'cf68c35f51388b6764615a16a9585561b360b0b4': ADT/GLE: Support more layouts in explode mode.
| * ADT/GLE: Support more layouts in explode mode.Xavier Ducrohet2010-01-261-0/+257
| | | | | | | | | | Bug: 2391888 Change-Id: Id4076bed2d1c78896ccdd3872debdc84d9487aee