aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Fix package renaming for Manifest and BuildConfig classesTor Norbye2012-12-201-15/+80
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes 41685: Rename Package Breaks BuildConfig and Manifest. It also cleans up the refactoring in that it now only adds import R statements to classes that actually contain an R reference. Change-Id: Ia0e2833bc9e25f92be33994047c4527c9e3e9dc1
* | | Update Asset Studio launcher and icon generators. Also removes LDPI.Roman Nurik2012-12-182-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change updates the Asset Studio launcher icon generator to the new visual style described in the Android Design guidelines. It also adds XXHDPI icon creation for launcher icons, which is important for some newer devices such as Nexus 10. The change also removes shape selection for notification icons, since this only affected pre-Gingerbread devices. Pre-Gingerbread icons are still generated, but they now always have a square shape for simplicity. Finally, this change removes LDPI for all icon generators. LDPI is much less relevant today than it was a few years ago, and allowing platform scaling of MDPI resources is normally an acceptable alternative to providing LDPI specific resources. Change-Id: I65afc5b38b25170604cf69ba355816288d30d6d5
* | | Remove category explanationTor Norbye2012-12-131-2/+2
| | | | | | | | | | | | | | | | | | It's always null. Change-Id: I2a465dd41653398fc747f531f963414964c9da14
* | | Refactoring fixesTor Norbye2012-12-106-38/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL contains a couple of tweaks to the refactoring support. First, update <declare-styleable> declarations for renamed custom views. Second, update XML in downstream projects from library projects. Third, allow invoking the rename refactoring from XML files from class attributes and custom view tags as well (until now it applied only to resource names.) Finally, update unit test golden file format to include whether each change is enabled, and tweak the code to disable R class changes to handle some additional scenarios. Change-Id: I74ccbe1b0f15ec10429f8dda7674f51f9a6f83cd
* | | Findbugs cleanupTor Norbye2012-12-062-2/+1
| | | | | | | | | | | | | | | | | | | | | Fix a couple of issues found by findbugs, and some test stability fixes. Change-Id: I97390ea606ea25d6a68e5b7f8245e5e689117995
* | | Support layout aliases properlyTor Norbye2012-12-067-81/+12
| | | | | | | | | | | | Change-Id: I3c1dac7809a225118b69f1557a42051e96011198
* | | Filter out non-launcher activity from new project activity listTor Norbye2012-12-052-8/+30
| | | | | | | | | | | | | | | | | | | | | Also show template title rather than template directory name in the template list (issue 38955) Change-Id: Iedd3949aa5c7fce879a4d7fd11e4fa73660d6451
* | | Merge "Grid Layout tweaks"Tor Norbye2012-12-055-33/+204
|\ \ \
| * | | Grid Layout tweaksTor Norbye2012-12-045-33/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This switches the grid layout rule editor over to the more traditional grid-oriented editing, and makes some tweaks to that handling (along with some bug fixes for namespace handling). This is a better editing experience than the richer but currently broken free form editing of GridLayouts. Change-Id: I4db2c604ddf34e37c6fe4dd2b8270d20c68dc12f
* | | | Merge "Add namespace elements from code completion lazily"Tor Norbye2012-12-053-9/+59
|\ \ \ \
| * | | | Add namespace elements from code completion lazilyTor Norbye2012-12-043-9/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XmlUtils.lookupNamespace() method would unconditionally insert a namespace declaration if called with a namespace that is not already declared in the document. This had the negative effect that simply bringing up the code completion dialog on a custom view would immediately insert the app namespace declaration, even if the user didn't select one of the app namespace attributes. Furthermore, this edit would sometimes result in the caret being placed in the wrong place after insertion. This changeset adds a new parameter to the lookupNamespace() method, "create", which lets the caller deliberately decide whether the new namespace element should be created. Second, code completion now only inserts the namespace declaration as part of the completion apply handler, meaning you only get the namespace if you pick one of the custom attributes. It also uses a document position to ensure that the insert and caret positions are preserved properly and take the namespace insertion into account. Change-Id: I21cf678df454b09460139fe35d33ca88b8e91757
* | | | | Merge "Code completion improvements for custom views and themes"Tor Norbye2012-12-0523-38/+590
|\ \ \ \ \ | |/ / / /
| * | | | Code completion improvements for custom views and themesTor Norbye2012-12-0423-38/+590
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset adds custom view completion to the content assist. Code completion for elements (e.g. from text context or inside a <) should now include custom views found in the project, and prefix typing should work as well. Similarly, code completing inside a <fragment> name attribute or a <view> class attribute should complete fragment and view classes. It will display javadocs for these classes, if available. It also hooks up class completion in manifest files, so completing <activity>, <application>, <receiver> etc android:name attributes should show matching classes corresponding to the tag being edited. The completion will also always complete theme references (?) even when there is no known metadata for the tag, such as for an arbitrary custom view. Also fix descriptor metadata such that <view> and <requestFocus> show up in code completion, works properly for layout editor palette drag (with a class selection popup) and with a suitable outline icon. Also tweak refactoring such that it handles both class= and android:name usage for <fragment> elements. Finally, for the LinearLayout automatically added inside new ScrollViews, set the vertical attribute since that's usually what you want. Change-Id: Ifc98c19607ddc4e69d7645f2720120ce72d0cd95
* | | | Add flag to disable dex merging.Xavier Ducrohet2012-12-054-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with dex.disable.merger=true in the project.properties, it is now possible to revert to the old build mechanism where every jar files is always passed to dex during dex'ing instead of pre-dexing them only when they change. This is to go around some issue with dexmerger that are only triggered in some cases. Change-Id: I7288ae4e1ae02b088c2f74f2f63c819c6587016a
* | | | Merge "Support package conflicts between app and libs."Xavier Ducrohet2012-12-051-12/+81
|\ \ \ \
| * | | | Support package conflicts between app and libs.Xavier Ducrohet2012-12-051-12/+81
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If 2 libraries share the same package name, this is now a build breakage, unless all libraries share the same package. This is because the libraries R classes only contain the resources declared in the libraries themselves (plus dependencies). Since two libraries could share the same package name without depending on one another, it's possible to ensure that creating only one R class would work for both. (Merging both R class might be possible but is too risky for a quick fix like this). If all the libraries share the same package, then a single R class is created for that package that contains all the symbol of the app (simpler than merging all the symbols for now) If a library and the app share the same package name, the R class for the library is not created (since the R class for the app contains all resources). This already worked in ADT, so this changeset only fixes Ant. Change-Id: I95f0b734ba263051961268d960d59749f5b6e1a5
* | | | Merge "Make templates handle custom namespaces properly"Tor Norbye2012-12-052-0/+7
|\ \ \ \
| * | | | Make templates handle custom namespaces properlyTor Norbye2012-12-042-0/+7
| |/ / / | | | | | | | | | | | | Change-Id: Id3685aa63a1e3017b345ec28bbb454656547258c
* | | | Fix Rename Application Package such that it doesn't touch bin/Tor Norbye2012-12-052-4/+52
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the rename application package refactoring such that it only modifies AndroidManifest.xml, not for example a copy in bin/. Also added a diagnostic information message to the plain Java package refactoring, shown when refactoring the application package, explaining that the refactoring will not actually change the manifest package, and explaining how to invoke the dedicated refactoring to change it. Also add unit tests for this refactoring. Change-Id: I13054e033b9ee44210ca341f00c633d73a4418b4
* | | Merge "Fix goto @+id, and order layout_width before width in completion"Tor Norbye2012-12-032-5/+54
|\ \ \
| * | | Fix goto @+id, and order layout_width before width in completionTor Norbye2012-11-292-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset makes two XML editing releated tweaks: * First, Go To Declaration now works on @+id/ attributes. Until now, it ignored these with a comment that we're already at the declaration. However, there are cases where these are also used as a forward reference, such as in layout parameters for a relative layout. Now Go To Declaration will allow you to jump from these layout parameters to the actual element defining the attribute. * Second, if the user types "wi" in code completion, we offer both android:width and android:layout_width. However, the layout parameters were offered second, meaning users would sometimes select width instead of layout_width, the more likely choice. This changeset tweaks the order of the results in this scenario to offer the layout parameters first. Finally, it also makes some tweaks the the unit test framework to for example wait for all Android targets to be loaded (this wasn't always the case which made the test sometimes fail when running, but not when debugged.) It also updates the target SDK used for golden files to API 16 (from API 12) so some golden files are updated with changes in available attributes and descriptions. Change-Id: I84c92961f42fe63d39b6eeff9186d66183d67d6c
* | | | Merge "Add tools:targetApi to control local minSdk (like @TargetApi)"Tor Norbye2012-12-034-59/+78
|\ \ \ \
| * | | | Add tools:targetApi to control local minSdk (like @TargetApi)Tor Norbye2012-11-304-59/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add XML editor quickfix to set the attribute on an API violation. Change-Id: Ife95d73659656e98a6fb1a322354f5fcfcef1888
* | | | | Merge "Fix rename type, rename package and move type refactorings"Tor Norbye2012-12-0315-2154/+847
|\ \ \ \ \
| * | | | | Fix rename type, rename package and move type refactoringsTor Norbye2012-12-0315-2154/+847
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL updates the various refactorings to properly handle layout refactoring such that it not only updates custom views, but also updates fragment references, tool:context references etc. It also fixes missing manifest updates (such as replacing the parentActivityName attributes). Most importantly, it also fixes bugs where the wrong elements in the manifest could get updated. There are a lot of diffs in this CL because I basically replaced the old refactoring code (which had a lot of custom text change and document manipulation code) with code based on the new resource refactoring, where there is a single iteration of the XML documents. This also improves the emitted refactoring elements such that it only lists each file once. Also updated the unit tests to check additional scenarios; adding a second activity with the same prefix as the first is what revealed the broken document handling in the old code. Change-Id: I7c5959ca6b046ce3dab566663988cdd0389b0e5b
* | | | | Add renderscript specific compilation target.Xavier Ducrohet2012-11-304-15/+35
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The property name is "renderscript.target" and is to be located in project.properties. If not present, the minSdkVersion (or 11 if lower) is used. Change-Id: Ic243474ce1d5ce2235cbfdfc45092ed8a5ffbbf7
* | | | Add filterscript suppport.Xavier Ducrohet2012-11-295-26/+61
| | | | | | | | | | | | | | | | Change-Id: Iaefb640f35bdad1dc5d4be8565c2cafdc02e8324
* | | | Add support for layout dir qualifiers.Xavier Ducrohet2012-11-293-0/+65
|/ / / | | | | | | | | | Change-Id: I6da728d079975fa19f1ae816fa585031a9c6fe75
* | | Merge "40170: Fix namespace handling in resource file template merging"Tor Norbye2012-11-281-8/+25
|\ \ \
| * | | 40170: Fix namespace handling in resource file template mergingTor Norbye2012-11-261-8/+25
| |/ / | | | | | | | | | Change-Id: If96987025accac0a11b860580a6935020044e0d9
* | | Merge "40368: Support a root vertical LinearLayout in graphical editor"Tor Norbye2012-11-284-10/+24
|\ \ \
| * | | 40368: Support a root vertical LinearLayout in graphical editorTor Norbye2012-11-264-10/+24
| |/ / | | | | | | | | | Change-Id: I7b156f1f8b8f939f9f940962e50c34595b9fa3b7
* | | Merge "3767: XML file gets compiled to out.xml in Eclipse"Tor Norbye2012-11-281-6/+18
|\ \ \
| * | | 3767: XML file gets compiled to out.xml in EclipseTor Norbye2012-11-281-6/+18
| | | | | | | | | | | | | | | | Change-Id: I2e4fa88e9bc2a858cca6cc21cf88c502b9594ad8
* | | | Fixes for go to declaration for theme referencesTor Norbye2012-11-281-16/+59
| | | | | | | | | | | | | | | | Change-Id: I80116bce331b9504bc35ec6cf461479a135eaad6
* | | | Merge "40161: Make the new names for imported projects editable"Tor Norbye2012-11-282-40/+187
|\ \ \ \
| * | | | 40161: Make the new names for imported projects editableTor Norbye2012-11-212-40/+187
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Also pick up the old Eclipse project name if importing an Eclipse project. Change-Id: I138195f89a1631f5b9b332973a3a2b655ae5c2de
* | | | Merge "Adjust the build and target comboboxes to ensure >= minSdkVersion"Tor Norbye2012-11-281-3/+47
|\ \ \ \
| * | | | Adjust the build and target comboboxes to ensure >= minSdkVersionTor Norbye2012-11-211-3/+47
| |/ / / | | | | | | | | | | | | Change-Id: Ia0b0d611dfb5aa1952ebae573355be1726b4f342
* | | | Fix rename package refactoringTor Norbye2012-11-283-35/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset fixes a couple of bugs in the package rename refactoring code, including 34466: Android refactoring participant gives NPE It also fixes a bug in the move type refactoring, and adds unit tests for package rename, move type, and rename type. Change-Id: I4f43aabbcf1aeddc6c27011bfcffbe5a49c42372
* | | | Merge "Add sdktestutils package and consolidate some test utility code"Tor Norbye2012-11-285-10/+32
|\ \ \ \
| * | | | Add sdktestutils package and consolidate some test utility codeTor Norbye2012-11-265-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL creates a new project, sdk/testutils, which is added to the test projects for ADT and lint. It contains various test utility code, some from ADT tests, some from lint tests, and some duplicated in both, and some new utility code such as a better diff-er. The CL also updates a bunch of tests; many golden files are updated to the new test file diff output format, and some golden files were out of date, and in a couple of cases I fixed some bugs I noticed in the output. Change-Id: I98c49c929916ae9bad24db45602e10ded6c526da
* | | | | Merge "Use unicode escapes in LocaleManager"Tor Norbye2012-11-281-9/+9
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Use unicode escapes in LocaleManagerTor Norbye2012-11-161-9/+9
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that when the plugin is built outside of Eclipse (where the source file is marked as being in UTF-8 encoding), the special characters are handled correctly. Change-Id: I94d70bd3fb9d8a6bbf37e83eb30f161a2fc24016
* | | | Add resource renaming supportTor Norbye2012-11-2619-86/+2097
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset adds support for renaming resources. There are several new hooks for initiating a resource rename: (1) You can use the same keybinding as in Java files from XML files to initiate refactoring; for example, place the caret somewhere in @+id/foo or @string/bar and hit the refactoring keybinding, and a rename resource refactoring dialog shows up. (2) Invoking Quick Assistant in an XML file (Ctrl/Cmd 1) will offer to rename the resource, if the caret is over a resource name. (3) Renaming an XML or bitmap resource file, such as res/drawable-hdpi/foo.png, will now initiate the same XML resource naming machinery as above to update all resource references, plus it will also update all the other versions of the same file (e.g. in res/drawable-mdpi, res/drawable-xhdpi, etc.). Assuming an R field exists (e.g. the project has been built), it will also optionally update all Java field references. (4) Invoking renaming in the layout editor (via the rename keybinding, or via the context menu, or via the property sheet's "..." button) will also initiate id resource refactoring. Editing the id directly in the inline editor for the id will pop up a dialog asking whether to update references as well, along with a "Do not ask again" checkbox. (5) Finally, there is a renaming participant registered which will discover whether an R field is renamed, so if you go and rename R.layout.foo from Java, this will also kick in all of the above machinery - renaming layout files, updating resource references, etc. If the renamed resource is in a library project, the refactoring will also look at all the including projects and offer to update references there as well. Finally, this CL goes and fixes a few bugs in the existing refactoring operations; in particular, making sure that they not only look at files in layout/ but in all folder configurations containing layout files. It also adds refactoring unit tests. Change-Id: Ie88511a571b414fdc5be048e781fe29a34063cbf
* | | Merge "Add AdtPlugin.getShell()"Tor Norbye2012-11-2618-36/+67
|\ \ \
| * | | Add AdtPlugin.getShell()Tor Norbye2012-11-2018-36/+67
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of SWT and JFace methods require a Shell, and we had a lot of the following calls sprinkled throughout the codebase: AdtPlugin.getDisplay().getActiveShell() However, getActiveShell() can return null in quite a few cases (where it's not necessary), for example during focus transfers. This CL adds a new method, AdtPlugin.getShell(), which first tries the above call, but if that fails, will try harder to find another valid shell (e.g. the first shell in Display.getShells()). Change-Id: I3214ad56042be6eaf9b0fe0843c820e973fba8c0
* | | Fix refresh issue in the AVD Manager.Raphael Moll2012-11-262-15/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tools 21.0.0, hitting refrehs in the AVD Manager will create the list display to blink rapidly several times in a row. Same happens when a new AVD is created from a device. The issue is that the DeviceManager reparses and rebuilds its internal lists from scratch for every single call to getDevices() and getDeviceStatus(). Each time it notifies the listeners, and consequently the AVD Manager rebuilds its table. 2 fixes for that: - First use a boolean guard to prevent recursive refreshes of the avd manager table in AvdSelector. - Second fix DeviceManager to not rebuilt its lists all the time. This also changes DeviceManager so that callers create one instance that contains all the lists and there no static data shared between the instances. This is more deterministic. It shifts the responsibility to the callers to pass around the same instance if they want the data to remain consistent. Change-Id: Ia0c104395fe599071892e24bc234f8cffde9f635
* | Make hardcoded text detector also check menu filesTor Norbye2012-11-071-7/+5
| | | | | | | | Change-Id: I1b11d5e6650434fd5e57af05ff86b2d66a0a84db
* | Merge "Improve double click handling in the XML editors"Tor Norbye2012-11-072-1/+95
|\ \