aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Move classes to ide-common"Xavier Ducrohet2011-03-1884-295/+323
|\
| * Move classes to ide-commonXavier Ducrohet2011-03-1784-295/+323
| | | | | | | | | | | | | | | | | | ResourceFolder/File and children classes (single/multi file) ResourceItem and children classes ResourceRepository (base and framework, project stays in ADT for now) All the ResourceQualifiers and FolderConfiguration Change-Id: I5adc9bdc4886a8fa0ab44860763d594cf7af4bd5
* | Merge "Remove references to SWT from classes that are moving to ide-common."Xavier Ducrohet2011-03-1830-193/+271
|\ \ | |/
| * Remove references to SWT from classes that are moving to ide-common.Xavier Ducrohet2011-03-1730-193/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the SWT based getIcon from the resource qualifier and use a static helper instead. - Make a new enum ResourceDeltaKind to replace the IResourceDelta integer constants, and use the same helper class to convert from one to the other. - Make ResourceRepository exclusively use the IAbstractFile/Folder - Use the ILogger in place of AdtPlugin (which implements ILogger) Change-Id: I0011c01ac2064b07d28c980112c47cfa433ee372
* | Merge "Remove unused contentTypeBinding."Raphael Moll2011-03-181-15/+0
|\ \
| * | Remove unused contentTypeBinding.Raphael Moll2011-03-171-15/+0
|/ / | | | | | | | | | | | | | | This was added as a test when investigating the issue 15003. It's actually harmful and prevents from following links to like @android:string/ok from XML resource files. Change-Id: Ib0ae523a139cff960b222c138136c27902f26e7a
* | Merge "Add missing notice files."Xavier Ducrohet2011-03-17117-313/+4776
|\ \
| * | Add missing notice files.Xavier Ducrohet2011-03-15117-313/+4776
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fix some makefiles to make sure the notices are picked up. - move the makefile outside of the source folder. - resources are now in the source folder directly instead of being inside src/resources. It's much simpler. Change-Id: Ica8ee4c2bc8a9b035d23fc914d4137cdca7e567d
* | | Merge "Fix bounds computation for drags from palette to canvas"Tor Norbye2011-03-171-10/+28
|\ \ \ | |_|/ |/| |
| * | Fix bounds computation for drags from palette to canvasTor Norbye2011-03-171-10/+28
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | When you drag over the canvas, the potential drop location is shown along with an outline of the component as it would appear at that location. This relies on knowing the size of the dragged component. When dragging from the palette we use the drag preview image. However, the bounds were a bit too big because we were using the raw size of the drag image, and it now includes a drop shadow! This changeset adjusts this such that we use the original ViewInfo bounds from the render rather than the usually larger image bounds. Change-Id: Ic4b870995e17284fbd8a7ed2f4b4a7ec02f4e2c3
* | Merge "Disable the "unecessary else" warning."Raphael Moll2011-03-1714-18/+18
|\ \
| * | Disable the "unecessary else" warning.Raphael Moll2011-03-1714-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | This can be a matter of personal taste, but I find it a lot more readable to write an if {} else {} sometimes, and it's perfectly valid, so really it shouldn't be marked as a warning. Change-Id: Iac1b9bd5f9602b5018f7432422e0a083f4836490
* | | Merge "Remove xml content type binding from ExportEditor."Raphael Moll2011-03-171-3/+0
|\ \ \
| * | | Remove xml content type binding from ExportEditor.Raphael Moll2011-03-171-3/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added by mistake when we were investigating the issue of bug 15003. The contentTypeBinding seems to be unused by Eclipse when selecting the proper editor, but it's still wrong to have it set on XML For the ExportEditor. since this one uses export.properties files. Change-Id: I82396debe6bcb4571f150b929aa5e0287f4e9dea
* | | Merge "Add Quickfix and Quick Assistant for creating resources"Tor Norbye2011-03-1715-32/+720
|\ \ \
| * | | Add Quickfix and Quick Assistant for creating resourcesTor Norbye2011-03-1715-32/+720
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset adds two related features: - A "marker resolution" which adds a quickfix to aapt errors for nonexistent resources. This means that you can right click on the error in the Problems view to create the associated missing resource. - A "quick assistant" which looks for a missing resource on the current line and if found adds a fix handler for it, similar to the quickfix above. When a fix is invoked, it will create the new file or value, and open it in the editor with the relevant value section selected. The quick assistant can be invoked by the normal Ctrl-1 (Cmd-1). The quickfix must be invoked from the Problems view; the Java editor seems to add an extra level of integration with a lightbulb in the editor margin but we don't get that in XML. The quickfixes work for all value-based resources, as well as some file-based ones (in particular, those supported by the New XML File wizard, which it reuses.) This changeset also adds unit tests for quickfixes along with a few infrastructure changes to support it. Change-Id: I962bcf6c98934685e4d74389469d0903115a75e3
* | | Merge "XML code completion improvements"Tor Norbye2011-03-1760-193/+1384
|\ \ \ | |/ / |/| |
| * | XML code completion improvementsTor Norbye2011-03-1560-193/+1384
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset contains a number of improvements to the code completion in XML files. (1) Add suffix completion in attribute values. For dimensional attributes, this will add in (or complete prefixes of) units like "dp", "sp", etc. For fractional attributes, the % and %p suffixes are completed. (In both cases, there is also a tooltip message provided shown in the completion documentation popup). In addition, for flag values, when completing at the end of a flag, then the separator character (|) along with the other flag values (except those already set) are offered. (2) Handle completion when the caret is not at the end. For example, if you have the following source: layout_w^idth="wrap_content" (^ = caret position) then if you invoke code completion you will also be offered the attribute layout_weight, and selecting it will -replace- the layout_width attribute with layout_height, it will not insert layout_weight in the middle of layout_width. This handling is done not just for attribute names as shown here but for attribute values and element tag names as well. (3) Improve @resource/ completion sorting. When completing resources, consider which attribute is being completed, and use that information to sort the resources. For example, if completing a "text" attribute then @string/, and @android:string/ resources will be listed first. For attributes like margins @dimen will be first, for include layout the @layout attributes will be listed first, and so on. Also, the resources are sorted alphabetically as the second sort key. (4) Hide some builtin Eclipse code completion items. In particular, the default code completion provider for Eclipse will always add the current attribute value as a completion. This is extremely confusing since if you have a typo, code completion will tell you that what you have is okay. I personally witnessed this confusing a user who had typed something from memory and code completion seemed to him to "confirm" that he had it right. To fix this, the code which installs completion providers, will identify the builting WST completion provider, and when found, replace it with a "filtering" wrapper. This completion provider delegates all its calls to the WST completion provider, but it recognizes a few patterns, in particular the above attribute value completion proposal as well as some namespace and schema ones, and removes these. (The reason we only filter out these items instead of removing it completely is that the completion provider also appears to be responsible for inserting code templates defined by the user, and we don't want to neuter those if defined by the user.) (5) Fix a bunch of corner cases - flags could only have a single separator (|), resource attribute completion items were missing icons, and completion in some positions was not working. (6) Unit tests. There are now comprehensive unit tests for code completion. Each unit test points to a particular source file and a particular position within the source file, and code completion is invoked for that position. A set of unit tests dump out the allowed completion items for each such position, and these are compared against golden files. A second set of unit tests then specify a particular code completion item among the choices to be applied, and then applies that completion item to the document. This, along with the caret position (indicated as ^) is written into a golden file and used for comparisons. To make it easy to see what these tests do, the golden file is actually recorded as a diff, so in the test you will see something like this: Code completion in completion1.xml for android:gravity="left|b^ottom" selecting bottom: < android:gravity="left|bottom" --- > android:gravity="left|bottom^" (6) There are some other misc changes. We had some code which used "dip" for device indepdendent pixels (such as the AbsoluteLayout handler). Since "dp" seems to be preferred, the code will now use that instead. Change-Id: I8bd5c8336d8747dac1f10a9269ea4197f304cb70
* | | Merge "Removing emulator/opengl from the sdk.git"David Turner2011-03-1614-2145/+0
|\ \ \ | |_|/ |/| |
| * | Removing emulator/opengl from the sdk.gitJacky Romano2011-03-1614-2145/+0
| | | | | | | | | | | | | | | | | | This project code is moving to live under development.git/tools/emulator Change-Id: I3f7673bc17681a0ffa14bb0b4d0880977b77f24d
* | | Merge "ConcurrentModificationException in AbstractPropertiesFieldsPart"Tor Norbye2011-03-151-2/+5
|\ \ \
| * | | ConcurrentModificationException in AbstractPropertiesFieldsPartTor Norbye2011-03-151-2/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | I ran into a ConcurrentModificationException when creating an XML file using the plain XML wizard (not the Android XML wizard - because I wanted to create an XML drawable which is not supported by the new Android XML wizard.) Change-Id: Id2ae606e9da47e6f7d42cf6a0dea61eb3e9ca15d
* | | Merge "Add specifc warnings config for most sdk eclipse projects."Xavier Ducrohet2011-03-1514-0/+896
|\ \ \ | |/ / |/| |
| * | Add specifc warnings config for most sdk eclipse projects.Xavier Ducrohet2011-03-1414-0/+896
| | | | | | | | | | | | Change-Id: I9837714c5673d43fa7108b16ab264f1017c4bd3d
* | | Merge "Prepare for moving platform-specific emulator modules to development.git"David 'Digit' Turner2011-03-144-0/+35
|\ \ \
| * | | Prepare for moving platform-specific emulator modules to development.gitDavid 'Digit' Turner2011-03-114-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to move the platform-specific modules to development.git to avoid some clashes. This patch uses a guard Make variable to ensure that each module is only built once. The plan is to simply copy these modules to development.git, then remove the current ones from sdk.git. The guard variable is here to ensure that the transition happens smoothly, i.e. if a build contains modules in both directories, only one of them will be built. Change-Id: I4bc58741a18488f18a4b17e8a1edc4a4a5a93cbc
* | | | Merge "XML code completion improvements"Tor Norbye2011-03-114-9/+68
|\ \ \ \ | |_|/ / |/| | |
| * | | XML code completion improvementsTor Norbye2011-03-114-9/+68
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, fix code completion for @android: resources such that if you type @android: the various resource types (@android:drawable/, @android:layout/, etc) are offered. Second, fix completion for the @android: token itself such that if you type "@a" then "@android:" is offered as a completion. Finally, make resource name completion work even for attributes that aren't marked in the metadata as allowing resource references. This will not be done for empty completion context, but if the user -explicitly- types a "@" in the value field, then resource completion will work. This is necessary for some attributes where our metadata is wrong, such as android:minHeight, where code completion currently refuses to complete a @dimen/ completion prefix. Change-Id: I175c8f7230d56987b9a945a2b791a2eb3e018a7c
* | | Merge "Extract as Include support for configuration variations"Tor Norbye2011-03-1133-325/+966
|\ \ \
| * | | Extract as Include support for configuration variationsTor Norbye2011-03-1133-325/+966
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, add support for the "Extract as Include" refactoring to update all identical code fragments in configuration variations of the same file. For example, if you have a particular subtree of XML elements in a file that you have then duplicated into say a landscape mode, then applying the Extract as Include refactoring will locate the same code fragment in both files, and replace *both* code fragments with an include (and this is optional with a checkbox in the wizard dialog). This only happens when the extracted code fragment is "identical" in both files. The code fragments can vary in terms of XML formatting and attribute order (and namespace prefix choice), but the element hierarchy order, names, attributes defined and attribute values must be identical. Second, make fixes to the Change Layout and Change Widget Type refactorings such that when the id of the converted element is changed, then references to that id are updated as well. Third, ensure that the refactorings are enabled even when there is no text selection; in that case the refactoring will apply to the element containing the caret. Some test infrastructure improvements. Change-Id: Idb4ba40f4217dba2b13881b3d06e269c80ba4b97
* | | Merge "Underline the error range for aapt errors"Tor Norbye2011-03-113-2/+91
|\ \ \
| * | | Underline the error range for aapt errorsTor Norbye2011-03-113-2/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, aapt errors only show up as an error icon in the left hand margin, and the user has to figure out from the error message where on the line the error occurred. This changeset uses information in the error message to identify the specific range of text on the line that is affected, and underlines it. Change-Id: I322a8193af4e90bb972276aee80124771b6a46cd
* | | | Merge "Add drop-support for include tags"Tor Norbye2011-03-1128-53/+331
|\ \ \ \ | |/ / / |/| | |
| * | | Add drop-support for include tagsTor Norbye2011-03-0928-53/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the include tag back into the palette, and add special drop support for it such that when it is drop, a resource chooser pops up and asks you which layout to include. A new validator prevents any layouts from being chosen that would result in a cyclic dependency. This requires some infrastructure changes: First, drop handlers must distinguish between a view getting created as part of a previewing operation and getting created interactively. Second, in order to support cancel removing an inserted include if the user decides not to set an include, the node wrappers need to support removing an element. Also, use the metadata originally intended for the preview icon factory to also bypass palette drag previews for widgets that don't have UI. Change-Id: I1bdd1766ca4cfa2fdbca25b77c50c74e9c332cbd
* | | | Merge "Avoid repeating manifest element names."Raphael Moll2011-03-102-7/+21
|\ \ \ \
| * | | | Avoid repeating manifest element names.Raphael Moll2011-03-102-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the manifest form tree, avoid repeating element names in the tree labels. E.g. "MyActivity (Activity)" can just be "MyActivity". Change-Id: I8de481aabcbc33e830e18c528cb10a0b2a14138a
* | | | | Merge "Guard against badly configured projects in aidl processor."Xavier Ducrohet2011-03-101-2/+4
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Guard against badly configured projects in aidl processor.Xavier Ducrohet2011-03-101-2/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | The project could have source folders that don't exist. Change-Id: Ie8f9e35580918d9fade5074ca90d295c49e6cae4
* | | | Merge "A bit more refactoring around the resource repository."Xavier Ducrohet2011-03-109-153/+150
|\ \ \ \
| * | | | A bit more refactoring around the resource repository.Xavier Ducrohet2011-03-109-153/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move Configurable in the same package as FolderConfiguration. - Move ResourceManager.getConfig in FolderConfiguration. - Move ResourceMaanger.processFolder in ResourceRepository. - Move ResourceManager.processFile in ResourceFolder. - Rename some misc methods. Change-Id: Ifa557c7db22c3fb82327a68f4365c08d152d9cf4
* | | | | Merge "Deactive the logging code used for issue 15003."Raphael Moll2011-03-101-1/+4
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Deactive the logging code used for issue 15003.Raphael Moll2011-03-091-1/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This doesn't quite remove the logging code, just deactivate it for right now. Change-Id: I9a471926f6575bce117bf6079200f7939457fb57
* | | | Merge "Make inline ResourceItem able to generate ResourceValue"Xavier Ducrohet2011-03-108-140/+181
|\ \ \ \
| * | | | Make inline ResourceItem able to generate ResourceValueXavier Ducrohet2011-03-108-140/+181
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fix the issue that since the simplification of the resource repository, the resource item for inline ID values would not be called to generate a ResourceValue since their list of source file was empty. This moves the creation of the ResourceValue to the ResourceItem so that InlineResourceItem can override it. This required moving findMatchingConfigurable into FolderConfiguration which is a much better place for it anyway. Change-Id: I36d6b148528c593ea432c9fd0ac8d542cbe2a26e
* | | | Merge "ADT: fix unittests."Xavier Ducrohet2011-03-091-5/+6
|\ \ \ \ | |/ / / |/| | |
| * | | ADT: fix unittests.Xavier Ducrohet2011-03-091-5/+6
| | | | | | | | | | | | | | | | Change-Id: I258d393b5297d916b58ed3574b77f521968a13c0
* | | | Merge "Fix potential NPE in AvdCreationDialog"Raphael Moll2011-03-091-2/+1
|\ \ \ \ | |/ / / |/| | |
| * | | Fix potential NPE in AvdCreationDialogRaphael Moll2011-03-081-2/+1
| | |/ | |/| | | | | | | Change-Id: Ic71e0242b34979f621e291c808b6a0ee35b711ff
* | | Merge "Deactive BinaryXml ContentType."Raphael Moll2011-03-091-2/+3
|\ \ \
| * | | Deactive BinaryXml ContentType.Raphael Moll2011-03-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This breask the BinaryXml Editor feature. However it fixes the issue 15003, which is more important: http://code.google.com/p/android/issues/detail?id=15003 Change-Id: Iac0fb6ef38b7d6e60da1c8526ce9f58db2e7994b