diff options
Diffstat (limited to 'eclipse')
105 files changed, 802 insertions, 1722 deletions
diff --git a/eclipse/README_WINDOWS.txt b/eclipse/README_WINDOWS.txt deleted file mode 100644 index 1480f5d..0000000 --- a/eclipse/README_WINDOWS.txt +++ /dev/null @@ -1,32 +0,0 @@ -[RM 20080623] - -1- To build the Eclipse plugin: -Under Linux: -$ cd your-device-directory -$ tools/eclipse/scripts/build_server.sh destination-directory - -This will create an "android-eclipse.zip" in the selected destination directory. -Then in Eclipse, you can use Help > Software Updates > Find and Install > Search for new Features > Next > New Archived Site > select the new android-eclipse.zip. Then with the new archive checked, click Finish/Next. - - -2- To build a Windows SDK, you need two steps: -a- First you need to create a Linux SDK: - -Under Linux: -$ cd your-device-directory -$ make sdk -Note: if you get an error when building the javadoc, make sure you use a Java SDK 1.5 -Note: if you get an error when building layoutlib, make sure you use a Java SDK 1.5.0-b13. - -b- Once you have a Linux SDK, you can create a Windows SDK: - -You need a Windows machine with XP or Vista and Cygwin. -- Installer at http://sources.redhat.com/cygwin/ -- Set Default Text File Type to DOS/text, not Unix/binary. -- Select packages autoconf, gcc, g++, bison, python, zip, unzip, mingw-zlib -- Suggested extra packages: emacs, wget, openssh, rsync - -Then under Cygwin: -$ cd your-device-directory -$ tools/buildbot/_make_windows_sdk.sh path-to-the-linux-sdk.zip destination-directory - diff --git a/eclipse/TYCHO_BUILD b/eclipse/TYCHO_BUILD deleted file mode 100644 index 7836ec9..0000000 --- a/eclipse/TYCHO_BUILD +++ /dev/null @@ -1,6 +0,0 @@ -To build using Tycho, perform: - - $ cd sdk/eclipse - $ make -f maven.mk - -The resulting artifacts will be in $OUT/host/maven/bundles-<version>-SNAPSHOT/products/ diff --git a/eclipse/artifacts/bundles/category.xml b/eclipse/artifacts/bundles/category.xml index b2149c4..e4c8f4c 100644 --- a/eclipse/artifacts/bundles/category.xml +++ b/eclipse/artifacts/bundles/category.xml @@ -3,25 +3,25 @@ <description url="https://dl-ssl.google.com/android/eclipse/"> Update Site for Android Development Toolkit </description> - <feature url="features/com.android.ide.eclipse.ddms_23.0.4.qualifier.jar" id="com.android.ide.eclipse.ddms.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.ddms_24.0.2.qualifier.jar" id="com.android.ide.eclipse.ddms.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.hierarchyviewer_23.0.4.qualifier.jar" id="com.android.ide.eclipse.hierarchyviewer.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.hierarchyviewer_24.0.2.qualifier.jar" id="com.android.ide.eclipse.hierarchyviewer.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.traceview_23.0.4.qualifier.jar" id="com.android.ide.eclipse.traceview.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.traceview_24.0.2.qualifier.jar" id="com.android.ide.eclipse.traceview.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.gldebugger_23.0.4.qualifier.jar" id="com.android.ide.eclipse.gldebugger.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.gldebugger_24.0.2.qualifier.jar" id="com.android.ide.eclipse.gldebugger.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.adt_23.0.4.qualifier.jar" id="com.android.ide.eclipse.adt.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.adt_24.0.2.qualifier.jar" id="com.android.ide.eclipse.adt.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.adt.package_23.0.4.qualifier.jar" id="com.android.ide.eclipse.adt.package.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.adt.package_24.0.2.qualifier.jar" id="com.android.ide.eclipse.adt.package.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.ndk_23.0.4.qualifier.jar" id="com.android.ide.eclipse.ndk.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.ndk_24.0.2.qualifier.jar" id="com.android.ide.eclipse.ndk.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> <category-def name="developer" label="Developer Tools"> diff --git a/eclipse/artifacts/bundles/ide.product b/eclipse/artifacts/bundles/ide.product index 2da5f5b..d130861 100644 --- a/eclipse/artifacts/bundles/ide.product +++ b/eclipse/artifacts/bundles/ide.product @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <?pde version="3.5"?> -<product name="Eclipse IDE for Android Developers" uid="adtproduct" id="com.android.ide.eclipse.adt.package.adtproduct" application="org.eclipse.ui.ide.workbench" version="23.0.4.qualifier" useFeatures="true" includeLaunchers="true"> +<product name="Eclipse IDE for Android Developers" uid="adtproduct" id="com.android.ide.eclipse.adt.package.adtproduct" application="org.eclipse.ui.ide.workbench" version="24.0.2.qualifier" useFeatures="true" includeLaunchers="true"> <aboutInfo> <image path="/plugin-adt-package/adt-about.png"/> @@ -44,7 +44,7 @@ </plugins> <features> - <feature id="com.android.ide.eclipse.adt.package.feature" version="23.0.4.qualifier"/> + <feature id="com.android.ide.eclipse.adt.package.feature" version="24.0.2.qualifier"/> </features> <configurations> diff --git a/eclipse/artifacts/bundles/monitor.product b/eclipse/artifacts/bundles/monitor.product index c4ab4a2..9b3c254 100644 --- a/eclipse/artifacts/bundles/monitor.product +++ b/eclipse/artifacts/bundles/monitor.product @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <?pde version="3.5"?> -<product name="monitor" uid="monitorproduct" id="com.android.ide.eclipse.monitor.product" application="com.android.ide.eclipse.monitor.Application" version="23.0.4.qualifier" useFeatures="true" includeLaunchers="true"> +<product name="monitor" uid="monitorproduct" id="com.android.ide.eclipse.monitor.product" application="com.android.ide.eclipse.monitor.Application" version="24.0.2.qualifier" useFeatures="true" includeLaunchers="true"> <configIni use="default"> diff --git a/eclipse/artifacts/bundles/pom.xml b/eclipse/artifacts/bundles/pom.xml index 908be0e..ca2fe35 100644 --- a/eclipse/artifacts/bundles/pom.xml +++ b/eclipse/artifacts/bundles/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>bundles</artifactId> <packaging>eclipse-repository</packaging> <name>bundles</name> diff --git a/eclipse/artifacts/p2repo/category.xml b/eclipse/artifacts/p2repo/category.xml index 842344d..5fa6ce0 100644 --- a/eclipse/artifacts/p2repo/category.xml +++ b/eclipse/artifacts/p2repo/category.xml @@ -3,22 +3,22 @@ <description url="https://dl-ssl.google.com/android/eclipse/"> Update Site for Android Development Toolkit </description> - <feature url="features/com.android.ide.eclipse.ddms_23.0.4.qualifier.jar" id="com.android.ide.eclipse.ddms.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.ddms_24.0.2.qualifier.jar" id="com.android.ide.eclipse.ddms.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.hierarchyviewer_23.0.4.qualifier.jar" id="com.android.ide.eclipse.hierarchyviewer.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.hierarchyviewer_24.0.2.qualifier.jar" id="com.android.ide.eclipse.hierarchyviewer.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.traceview_23.0.4.qualifier.jar" id="com.android.ide.eclipse.traceview.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.traceview_24.0.2.qualifier.jar" id="com.android.ide.eclipse.traceview.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.gldebugger_23.0.4.qualifier.jar" id="com.android.ide.eclipse.gldebugger.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.gldebugger_24.0.2.qualifier.jar" id="com.android.ide.eclipse.gldebugger.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.adt_23.0.4.qualifier.jar" id="com.android.ide.eclipse.adt.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.adt_24.0.2.qualifier.jar" id="com.android.ide.eclipse.adt.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.ndk_23.0.4.qualifier.jar" id="com.android.ide.eclipse.ndk.feature" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.ndk_24.0.2.qualifier.jar" id="com.android.ide.eclipse.ndk.feature" version="24.0.2.qualifier"> <category name="developer"/> </feature> <category-def name="developer" label="Developer Tools"> diff --git a/eclipse/artifacts/p2repo/pom.xml b/eclipse/artifacts/p2repo/pom.xml index 468d550..acce877 100644 --- a/eclipse/artifacts/p2repo/pom.xml +++ b/eclipse/artifacts/p2repo/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>p2repo</artifactId> <packaging>eclipse-repository</packaging> <name>p2repo</name> diff --git a/eclipse/build.gradle b/eclipse/build.gradle index 8671690..17bde4f 100644 --- a/eclipse/build.gradle +++ b/eclipse/build.gradle @@ -46,6 +46,7 @@ def artifacts = [ 'lint-api' : "com.android.tools.lint:lint-api:$ext.baseVersion", 'lint-checks' : "com.android.tools.lint:lint-checks:$ext.baseVersion", 'asset-studio' : "com.android.tools:asset-studio:$ext.baseVersion", + 'annotations' : "com.android.tools:annotations:$ext.baseVersion", 'common' : "com.android.tools:common:$ext.baseVersion", 'dvlib' : "com.android.tools:dvlib:$ext.baseVersion", 'hierarchyviewer2lib' : "com.android.tools:hierarchyviewer2lib:$ext.baseVersion", @@ -62,15 +63,15 @@ def artifacts = [ // prebuilts 'ant-glob' : 'com.android.tools.external:ant-glob:1.0', - 'asm-4.0' : 'org.ow2.asm:asm:4.0', - 'asm-analysis-4.0' : 'org.ow2.asm:asm-analysis:4.0', - 'asm-tree-4.0' : 'org.ow2.asm:asm-tree:4.0', + 'asm-5.0.3' : 'org.ow2.asm:asm:5.0.3', + 'asm-analysis-5.0.3' : 'org.ow2.asm:asm-analysis:5.0.3', + 'asm-tree-5.0.3' : 'org.ow2.asm:asm-tree:5.0.3', 'commons-codec-1.4' : 'commons-codec:commons-codec:1.4', 'commons-compress-1.0' : 'org.apache.commons:commons-compress:1.8.1', 'commons-logging-1.1.1' : 'commons-logging:commons-logging:1.1.1', 'easymock' : 'org.easymock:easymock:2.4', 'freemarker-2.3.20' : 'org.freemarker:freemarker:2.3.20', - 'guava-15.0' : 'com.google.guava:guava:15.0', + 'guava-17.0' : 'com.google.guava:guava:17.0', 'host-libprotobuf-java-2.3.0-lite' : 'com.android.tools.external:libprotobuf-java-lite:2.3.0', 'httpclient-4.1.1' : 'org.apache.httpcomponents:httpclient:4.1.1', 'httpcore-4.1' : 'org.apache.httpcomponents:httpcore:4.1', @@ -80,7 +81,7 @@ def artifacts = [ 'jfreechart-swt-1.0.9' : 'jfree:jfreechart-swt:1.0.9', 'kxml2-2.3.0' : 'net.sf.kxml:kxml2:2.3.0', 'liblzf-1.0' : 'com.android.tools.external:liblzf:1.0', - 'lombok-ast-0.2.2' : 'com.android.tools.external.lombok:lombok-ast:0.2.2', + 'lombok-ast-0.2.3' : 'com.android.tools.external.lombok:lombok-ast:0.2.3', 'propertysheet' : 'com.android.tools.external:propertysheet:1.0', ] diff --git a/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml b/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml index 5ada338..450aeb4 100644 --- a/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.adt.package/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.adt.package.feature" label="ADT Package" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project" plugin="com.android.ide.eclipse.adt.package"> diff --git a/eclipse/features/com.android.ide.eclipse.adt.package/pom.xml b/eclipse/features/com.android.ide.eclipse.adt.package/pom.xml index 1a9d72e..a71c9e5 100644 --- a/eclipse/features/com.android.ide.eclipse.adt.package/pom.xml +++ b/eclipse/features/com.android.ide.eclipse.adt.package/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.adt.package.feature</artifactId> <packaging>eclipse-feature</packaging> <name>adt.package</name> diff --git a/eclipse/features/com.android.ide.eclipse.adt/feature.xml b/eclipse/features/com.android.ide.eclipse.adt/feature.xml index 213e68a..0020730 100644 --- a/eclipse/features/com.android.ide.eclipse.adt/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.adt/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.adt.feature" label="Android Development Tools" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project" plugin="com.android.ide.eclipse.adt"> diff --git a/eclipse/features/com.android.ide.eclipse.adt/pom.xml b/eclipse/features/com.android.ide.eclipse.adt/pom.xml index cd910d5..a3ff33f 100644 --- a/eclipse/features/com.android.ide.eclipse.adt/pom.xml +++ b/eclipse/features/com.android.ide.eclipse.adt/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.adt.feature</artifactId> <packaging>eclipse-feature</packaging> <name>adt</name> diff --git a/eclipse/features/com.android.ide.eclipse.ddms/feature.xml b/eclipse/features/com.android.ide.eclipse.ddms/feature.xml index 1c38a69..1724cf5 100644 --- a/eclipse/features/com.android.ide.eclipse.ddms/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.ddms/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.ddms.feature" label="Android DDMS" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project" plugin="com.android.ide.eclipse.ddms"> diff --git a/eclipse/features/com.android.ide.eclipse.ddms/pom.xml b/eclipse/features/com.android.ide.eclipse.ddms/pom.xml index 81dd4ae..c17e681 100644 --- a/eclipse/features/com.android.ide.eclipse.ddms/pom.xml +++ b/eclipse/features/com.android.ide.eclipse.ddms/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.ddms.feature</artifactId> <packaging>eclipse-feature</packaging> <name>ddms</name> diff --git a/eclipse/features/com.android.ide.eclipse.gldebugger/feature.xml b/eclipse/features/com.android.ide.eclipse.gldebugger/feature.xml index fb13798..20d8a0e 100644 --- a/eclipse/features/com.android.ide.eclipse.gldebugger/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.gldebugger/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.gldebugger.feature" label="Tracer for OpenGL ES" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project"> <description> diff --git a/eclipse/features/com.android.ide.eclipse.gldebugger/pom.xml b/eclipse/features/com.android.ide.eclipse.gldebugger/pom.xml index 4dac050..878d366 100644 --- a/eclipse/features/com.android.ide.eclipse.gldebugger/pom.xml +++ b/eclipse/features/com.android.ide.eclipse.gldebugger/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.gldebugger.feature</artifactId> <packaging>eclipse-feature</packaging> <name>gldebugger</name> diff --git a/eclipse/features/com.android.ide.eclipse.hierarchyviewer/feature.xml b/eclipse/features/com.android.ide.eclipse.hierarchyviewer/feature.xml index fe2da37..e368b30 100644 --- a/eclipse/features/com.android.ide.eclipse.hierarchyviewer/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.hierarchyviewer/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.hierarchyviewer.feature" label="Android Hierarchy Viewer" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project" plugin="com.android.ide.eclipse.hierarchyviewer"> diff --git a/eclipse/features/com.android.ide.eclipse.hierarchyviewer/pom.xml b/eclipse/features/com.android.ide.eclipse.hierarchyviewer/pom.xml index 1683196..90e22f4 100644 --- a/eclipse/features/com.android.ide.eclipse.hierarchyviewer/pom.xml +++ b/eclipse/features/com.android.ide.eclipse.hierarchyviewer/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.hierarchyviewer.feature</artifactId> <packaging>eclipse-feature</packaging> <name>hierarchyviewer</name> diff --git a/eclipse/features/com.android.ide.eclipse.monitor/feature.xml b/eclipse/features/com.android.ide.eclipse.monitor/feature.xml index 2acc8a3..2ac17c9 100644 --- a/eclipse/features/com.android.ide.eclipse.monitor/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.monitor/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.monitor.feature" label="Android Monitor" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project" plugin="com.android.ide.eclipse.monitor"> diff --git a/eclipse/features/com.android.ide.eclipse.monitor/pom.xml b/eclipse/features/com.android.ide.eclipse.monitor/pom.xml index cfafb9b..58564cb 100644 --- a/eclipse/features/com.android.ide.eclipse.monitor/pom.xml +++ b/eclipse/features/com.android.ide.eclipse.monitor/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.monitor.feature</artifactId> <packaging>eclipse-feature</packaging> <name>monitor</name> diff --git a/eclipse/features/com.android.ide.eclipse.ndk/feature.xml b/eclipse/features/com.android.ide.eclipse.ndk/feature.xml index 4bbabc9..e7dccd3 100644 --- a/eclipse/features/com.android.ide.eclipse.ndk/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.ndk/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.ndk.feature" label="Android Native Development Tools" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project"> <description> diff --git a/eclipse/features/com.android.ide.eclipse.ndk/pom.xml b/eclipse/features/com.android.ide.eclipse.ndk/pom.xml index d7c1727..4034fe5 100644 --- a/eclipse/features/com.android.ide.eclipse.ndk/pom.xml +++ b/eclipse/features/com.android.ide.eclipse.ndk/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.ndk.feature</artifactId> <packaging>eclipse-feature</packaging> <name>ndk</name> diff --git a/eclipse/features/com.android.ide.eclipse.pdt/feature.xml b/eclipse/features/com.android.ide.eclipse.pdt/feature.xml index d2896a1..7c21ee0 100644 --- a/eclipse/features/com.android.ide.eclipse.pdt/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.pdt/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.pdt" label="Android Platform Development Tools" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project"> <description> diff --git a/eclipse/features/com.android.ide.eclipse.tests/feature.xml b/eclipse/features/com.android.ide.eclipse.tests/feature.xml index 6e4c376..d91a7bf 100644 --- a/eclipse/features/com.android.ide.eclipse.tests/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.tests/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.tests" label="ADT Tests" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project"> <copyright> diff --git a/eclipse/features/com.android.ide.eclipse.traceview/feature.xml b/eclipse/features/com.android.ide.eclipse.traceview/feature.xml index 6bf79ce..c43f4f2 100644 --- a/eclipse/features/com.android.ide.eclipse.traceview/feature.xml +++ b/eclipse/features/com.android.ide.eclipse.traceview/feature.xml @@ -2,7 +2,7 @@ <feature id="com.android.ide.eclipse.traceview.feature" label="Android Traceview" - version="23.0.4.qualifier" + version="24.0.2.qualifier" provider-name="The Android Open Source Project" plugin="com.android.ide.eclipse.traceview"> diff --git a/eclipse/features/com.android.ide.eclipse.traceview/pom.xml b/eclipse/features/com.android.ide.eclipse.traceview/pom.xml index 08fbd6e..033658d 100644 --- a/eclipse/features/com.android.ide.eclipse.traceview/pom.xml +++ b/eclipse/features/com.android.ide.eclipse.traceview/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.traceview.feature</artifactId> <packaging>eclipse-feature</packaging> <name>traceview</name> diff --git a/eclipse/monitor/build.gradle b/eclipse/monitor/build.gradle index b11718d..5fde8f5 100644 --- a/eclipse/monitor/build.gradle +++ b/eclipse/monitor/build.gradle @@ -1,6 +1,6 @@ apply plugin: 'sdk-files' -def basePath = "../../../out/host/maven/bundles-23.0.4-SNAPSHOT/products/" +def basePath = "../../../out/host/maven/bundles-24.0.2-SNAPSHOT/products/" sdk { linux { diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.overlay/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.adt.overlay/META-INF/MANIFEST.MF index 205f90a..b0c58b6 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt.overlay/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.adt.overlay/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: ADT XML Overlay Bundle-SymbolicName: overlay.com.android.ide.eclipse.adt.overlay;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Vendor: The Android Open Source Project Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources, diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.overlay/pom.xml b/eclipse/plugins/com.android.ide.eclipse.adt.overlay/pom.xml index bfd3474..d319321 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt.overlay/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.adt.overlay/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>overlay.com.android.ide.eclipse.adt.overlay</artifactId> <packaging>eclipse-plugin</packaging> <name>adt.overlay</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF index b4c0567..34bbed6 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: ADT Package Bundle-SymbolicName: com.android.ide.eclipse.adt.package;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Vendor: The Android Open Source Project Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Eclipse-BundleShape: dir diff --git a/eclipse/plugins/com.android.ide.eclipse.adt.package/pom.xml b/eclipse/plugins/com.android.ide.eclipse.adt.package/pom.xml index e72956e..e40782d 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt.package/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.adt.package/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.adt.package</artifactId> <packaging>eclipse-plugin</packaging> <name>adt.package</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/.classpath b/eclipse/plugins/com.android.ide.eclipse.adt/.classpath index fcf27a5..c5f5919 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/.classpath +++ b/eclipse/plugins/com.android.ide.eclipse.adt/.classpath @@ -3,20 +3,20 @@ <classpathentry excluding="Makefile|resources/" kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry exported="true" kind="lib" path="libs/ninepatch.jar" sourcepath="/ninepatch"/> - <classpathentry exported="true" kind="lib" path="libs/sdkuilib.jar" sourcepath="/sdkuilib"/> - <classpathentry exported="true" kind="lib" path="libs/rule-api.jar" sourcepath="/rule-api"/> - <classpathentry exported="true" kind="lib" path="libs/lint-api.jar" sourcepath="/lint-api"/> - <classpathentry exported="true" kind="lib" path="libs/lint-checks.jar" sourcepath="/lint-checks"/> - <classpathentry exported="true" kind="lib" path="libs/asset-studio.jar" sourcepath="/asset-studio"/> - <classpathentry exported="true" kind="lib" path="libs/ant-glob.jar"/> - <classpathentry exported="true" kind="lib" path="libs/freemarker-2.3.20.jar"/> - <classpathentry exported="true" kind="lib" path="libs/manifest-merger.jar" sourcepath="/ManifestMerger"/> - <classpathentry exported="true" kind="lib" path="libs/lombok-ast-0.2.2.jar"/> - <classpathentry exported="true" kind="lib" path="libs/propertysheet.jar"/> - <classpathentry exported="true" kind="lib" path="libs/asm-4.0.jar"/> - <classpathentry exported="true" kind="lib" path="libs/asm-analysis-4.0.jar"/> - <classpathentry exported="true" kind="lib" path="libs/asm-tree-4.0.jar"/> - <classpathentry exported="true" kind="lib" path="libs/swtmenubar.jar"/> + <classpathentry exported="true" kind="lib" path="libs/ninepatch.jar" sourcepath="/ninepatch"/> + <classpathentry exported="true" kind="lib" path="libs/sdkuilib.jar" sourcepath="/sdkuilib"/> + <classpathentry exported="true" kind="lib" path="libs/rule-api.jar" sourcepath="/rule-api"/> + <classpathentry exported="true" kind="lib" path="libs/lint-api.jar" sourcepath="/lint-api"/> + <classpathentry exported="true" kind="lib" path="libs/lint-checks.jar" sourcepath="/lint-checks"/> + <classpathentry exported="true" kind="lib" path="libs/asset-studio.jar" sourcepath="/asset-studio"/> + <classpathentry exported="true" kind="lib" path="libs/ant-glob.jar"/> + <classpathentry exported="true" kind="lib" path="libs/freemarker-2.3.20.jar"/> + <classpathentry exported="true" kind="lib" path="libs/manifest-merger.jar" sourcepath="/ManifestMerger"/> + <classpathentry exported="true" kind="lib" path="libs/lombok-ast-0.2.2.jar"/> + <classpathentry exported="true" kind="lib" path="libs/propertysheet.jar"/> + <classpathentry exported="true" kind="lib" path="libs/asm-5.0.3.jar"/> + <classpathentry exported="true" kind="lib" path="libs/asm-analysis-5.0.3.jar"/> + <classpathentry exported="true" kind="lib" path="libs/asm-tree-5.0.3.jar"/> + <classpathentry exported="true" kind="lib" path="libs/swtmenubar.jar"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/.gitignore b/eclipse/plugins/com.android.ide.eclipse.adt/.gitignore new file mode 100644 index 0000000..5e56e04 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.adt/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF index 2b4508d..7cf3912 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Android Development Toolkit Bundle-SymbolicName: com.android.ide.eclipse.adt;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-ClassPath: ., libs/sdkuilib.jar, libs/ninepatch.jar, @@ -11,10 +11,10 @@ Bundle-ClassPath: ., libs/asset-studio.jar, libs/lint-api.jar, libs/lint-checks.jar, - libs/lombok-ast-0.2.2.jar, - libs/asm-4.0.jar, - libs/asm-tree-4.0.jar, - libs/asm-analysis-4.0.jar, + libs/lombok-ast-0.2.3.jar, + libs/asm-5.0.3.jar, + libs/asm-tree-5.0.3.jar, + libs/asm-analysis-5.0.3.jar, libs/propertysheet.jar, libs/ant-glob.jar, libs/swtmenubar.jar, diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/pom.xml b/eclipse/plugins/com.android.ide.eclipse.adt/pom.xml index 60b075d..f440c87 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.adt/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.adt</artifactId> <packaging>eclipse-plugin</packaging> <name>adt</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/VersionCheck.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/VersionCheck.java index 19d933d..576e9c3 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/VersionCheck.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/VersionCheck.java @@ -51,7 +51,7 @@ public final class VersionCheck { /** * The minimum version of the SDK Tools that this version of ADT requires. */ - private final static FullRevision MIN_TOOLS_REV = new FullRevision(23, 0, 0, 0); + private final static FullRevision MIN_TOOLS_REV = new FullRevision(24, 0, 2, 0); /** * Pattern to get the minimum plugin version supported by the SDK. This is read from diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java index c451195..78d9d94 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/BuildHelper.java @@ -43,6 +43,7 @@ import com.android.sdklib.internal.build.DebugKeyProvider.KeytoolException; import com.android.utils.GrabProcessOutput; import com.android.utils.GrabProcessOutput.IProcessOutput; import com.android.utils.GrabProcessOutput.Wait; +import com.google.common.base.Charsets; import com.google.common.hash.HashCode; import com.google.common.hash.HashFunction; import com.google.common.hash.Hashing; @@ -848,7 +849,7 @@ public class BuildHelper { // add a hash of the original file path HashFunction hashFunction = Hashing.md5(); - HashCode hashCode = hashFunction.hashString(inputFile.getAbsolutePath()); + HashCode hashCode = hashFunction.hashString(inputFile.getAbsolutePath(), Charsets.UTF_8); return name + "-" + hashCode.toString() + ".jar"; } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/Configuration.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/Configuration.java index 56479e7..c4253cd 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/Configuration.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/Configuration.java @@ -29,10 +29,9 @@ import com.android.ide.common.resources.ResourceRepository; import com.android.ide.common.resources.configuration.DensityQualifier; import com.android.ide.common.resources.configuration.DeviceConfigHelper; import com.android.ide.common.resources.configuration.FolderConfiguration; -import com.android.ide.common.resources.configuration.LanguageQualifier; import com.android.ide.common.resources.configuration.LayoutDirectionQualifier; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.ide.common.resources.configuration.NightModeQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; import com.android.ide.common.resources.configuration.ScreenSizeQualifier; import com.android.ide.common.resources.configuration.UiModeQualifier; import com.android.ide.common.resources.configuration.VersionQualifier; @@ -374,7 +373,7 @@ public class Configuration { * @return if this configuration represents a locale-specific layout */ public boolean isLocaleSpecificLayout() { - return mEditedConfig == null || mEditedConfig.getLanguageQualifier() != null; + return mEditedConfig == null || mEditedConfig.getLocaleQualifier() != null; } /** @@ -563,8 +562,7 @@ public class Configuration { // sync the selected locale Locale locale = getLocale(); - mFullConfig.setLanguageQualifier(locale.language); - mFullConfig.setRegionQualifier(locale.region); + mFullConfig.setLocaleQualifier(locale.qualifier); if (!locale.hasLanguage()) { // Avoid getting the layout library if the locale doesn't have any language. mFullConfig.setLayoutDirectionQualifier( @@ -630,11 +628,13 @@ public class Configuration { } sb.append(SEP); Locale locale = getLocale(); - if (isLocaleSpecificLayout() && locale != null) { + if (isLocaleSpecificLayout() && locale != null && locale.qualifier.hasLanguage()) { // locale[0]/[1] can be null sometimes when starting Eclipse - sb.append(locale.language.getValue()); + sb.append(locale.qualifier.getLanguage()); sb.append(SEP_LOCALE); - sb.append(locale.region.getValue()); + if (locale.qualifier.hasRegion()) { + sb.append(locale.qualifier.getRegion()); + } } sb.append(SEP); // Need to escape the theme: if we write the full theme style, then @@ -764,17 +764,18 @@ public class Configuration { if (config != null) { // Load locale. Note that this can get overwritten by the // project-wide settings read below. - LanguageQualifier language = Locale.ANY_LANGUAGE; - RegionQualifier region = Locale.ANY_REGION; + LocaleQualifier locale = Locale.ANY_QUALIFIER; String locales[] = values[2].split(SEP_LOCALE); - if (locales.length >= 2) { - if (locales[0].length() > 0) { - language = new LanguageQualifier(locales[0]); - } - if (locales[1].length() > 0) { - region = new RegionQualifier(locales[1]); + if (locales.length >= 2 && locales[0].length() > 0 + && !LocaleQualifier.FAKE_VALUE.equals(locales[0])) { + String language = locales[0]; + String region = locales[1]; + if (region.length() > 0 && !LocaleQualifier.FAKE_VALUE.equals(region)) { + locale = LocaleQualifier.getQualifier(language + "-r" + region); + } else { + locale = new LocaleQualifier(language); } - mLocale = Locale.create(language, region); + mLocale = Locale.create(locale); } // Decode the theme name: See {@link #getData} @@ -848,19 +849,21 @@ public class Configuration { String[] values = data.split(SEP); if (values.length == 2) { - LanguageQualifier language = Locale.ANY_LANGUAGE; - RegionQualifier region = Locale.ANY_REGION; + + LocaleQualifier qualifier = Locale.ANY_QUALIFIER; String locales[] = values[0].split(SEP_LOCALE); - if (locales.length >= 2) { - if (locales[0].length() > 0) { - language = new LanguageQualifier(locales[0]); - } - if (locales[1].length() > 0) { - region = new RegionQualifier(locales[1]); + if (locales.length >= 2 && locales[0].length() > 0 + && !LocaleQualifier.FAKE_VALUE.equals(locales[0])) { + String language = locales[0]; + String region = locales[1]; + if (region.length() > 0 && !LocaleQualifier.FAKE_VALUE.equals(region)) { + locale = Locale.create(LocaleQualifier.getQualifier(language + "-r" + region)); + } else { + locale = Locale.create(new LocaleQualifier(language)); } + } else { + locale = Locale.ANY; } - locale = Locale.create(language, region); - if (AdtPrefs.getPrefs().isAutoPickRenderTarget()) { target = ConfigurationMatcher.findDefaultRenderTarget(chooser); } else { @@ -916,9 +919,11 @@ public class Configuration { Locale locale = getLocale(); if (locale != null) { // locale[0]/[1] can be null sometimes when starting Eclipse - sb.append(locale.language.getValue()); + sb.append(locale.qualifier.getLanguage()); sb.append(SEP_LOCALE); - sb.append(locale.region.getValue()); + if (locale.qualifier.hasRegion()) { + sb.append(locale.qualifier.getRegion()); + } } sb.append(SEP); IAndroidTarget target = getTarget(); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java index 5805390..009b864 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java @@ -43,8 +43,7 @@ import com.android.ide.common.resources.ResourceFolder; import com.android.ide.common.resources.ResourceRepository; import com.android.ide.common.resources.configuration.DeviceConfigHelper; import com.android.ide.common.resources.configuration.FolderConfiguration; -import com.android.ide.common.resources.configuration.LanguageQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.ide.common.resources.configuration.ResourceQualifier; import com.android.ide.common.sdk.LoadStatus; import com.android.ide.eclipse.adt.AdtPlugin; @@ -1333,7 +1332,7 @@ public class ConfigurationChooser extends Composite } } - String languageCode = locale.language.getValue(); + String languageCode = locale.qualifier.getLanguage(); String languageName = LocaleManager.getLanguageName(languageCode); if (!locale.hasRegion()) { @@ -1350,7 +1349,7 @@ public class ConfigurationChooser extends Composite return languageCode; } } else { - String regionCode = locale.region.getValue(); + String regionCode = locale.qualifier.getRegion(); if (!brief && languageName != null) { String regionName = LocaleManager.getRegionName(regionCode); if (regionName != null) { @@ -1905,18 +1904,19 @@ public class ConfigurationChooser extends Composite languages = projectRes.getLanguages(); for (String language : languages) { - LanguageQualifier langQual = new LanguageQualifier(language); - // find the matching regions and add them SortedSet<String> regions = projectRes.getRegions(language); for (String region : regions) { - RegionQualifier regionQual = new RegionQualifier(region); - mLocaleList.add(Locale.create(langQual, regionQual)); + LocaleQualifier locale = LocaleQualifier.getQualifier(language + "-r" + region); + if (locale != null) { + mLocaleList.add(Locale.create(locale)); + } } // now the entry for the other regions the language alone // create a region qualifier that will never be matched by qualified resources. - mLocaleList.add(Locale.create(langQual)); + LocaleQualifier locale = new LocaleQualifier(language); + mLocaleList.add(Locale.create(locale)); } } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationDescription.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationDescription.java index f7be53d..956ac18 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationDescription.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationDescription.java @@ -27,8 +27,7 @@ import com.android.annotations.Nullable; import com.android.ide.common.resources.ResourceRepository; import com.android.ide.common.resources.configuration.DeviceConfigHelper; import com.android.ide.common.resources.configuration.FolderConfiguration; -import com.android.ide.common.resources.configuration.LanguageQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.ide.common.resources.configuration.ScreenSizeQualifier; import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.internal.editors.manifest.ManifestInfo; @@ -201,16 +200,19 @@ public class ConfigurationDescription { if (!localeString.isEmpty()) { // Load locale. Note that this can get overwritten by the // project-wide settings read below. - LanguageQualifier language = Locale.ANY_LANGUAGE; - RegionQualifier region = Locale.ANY_REGION; String locales[] = localeString.split(SEP_LOCALE); - if (locales[0].length() > 0) { - language = new LanguageQualifier(locales[0]); - } - if (locales.length > 1 && locales[1].length() > 0) { - region = new RegionQualifier(locales[1]); + if (locales[0].length() > 0 && !LocaleQualifier.FAKE_VALUE.equals(locales[0])) { + String language = locales[0]; + if (locales.length >= 2 && locales[1].length() > 0 && !LocaleQualifier.FAKE_VALUE.equals(locales[1])) { + description.locale = Locale.create(LocaleQualifier.getQualifier(language + "-r" + locales[1])); + } else { + description.locale = Locale.create(new LocaleQualifier(language)); + } + } else { + description.locale = Locale.ANY; } - description.locale = Locale.create(language, region); + + } String activity = element.getAttribute(ATTR_ACTIVITY); @@ -281,9 +283,9 @@ public class ConfigurationDescription { if (locale != null && (locale.hasLanguage() || locale.hasRegion())) { String value; if (locale.hasRegion()) { - value = locale.language.getValue() + SEP_LOCALE + locale.region.getValue(); + value = locale.qualifier.getLanguage() + SEP_LOCALE + locale.qualifier.getRegion(); } else { - value = locale.language.getValue(); + value = locale.qualifier.getLanguage(); } element.setAttribute(ATTR_LOCALE, value); } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationMatcher.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationMatcher.java index b868f14..9724d40 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationMatcher.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationMatcher.java @@ -21,9 +21,8 @@ import com.android.ide.common.resources.ResourceFile; import com.android.ide.common.resources.configuration.DensityQualifier; import com.android.ide.common.resources.configuration.DeviceConfigHelper; import com.android.ide.common.resources.configuration.FolderConfiguration; -import com.android.ide.common.resources.configuration.LanguageQualifier; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.ide.common.resources.configuration.NightModeQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; import com.android.ide.common.resources.configuration.ResourceQualifier; import com.android.ide.common.resources.configuration.ScreenOrientationQualifier; import com.android.ide.common.resources.configuration.ScreenSizeQualifier; @@ -205,8 +204,8 @@ public class ConfigurationMatcher { Locale locale = localeList.get(i); // update the test config with the locale qualifiers - testConfig.setLanguageQualifier(locale.language); - testConfig.setRegionQualifier(locale.region); + testConfig.setLocaleQualifier(locale.qualifier); + if (editedConfig.isMatchFor(testConfig) && isCurrentFileBestMatchFor(testConfig)) { @@ -273,7 +272,7 @@ public class ConfigurationMatcher { // However, if it doesn't, we don't randomly take the first locale, we take one // matching the current host locale (making sure it actually exist in the project) int start, max; - if (editedConfig.getLanguageQualifier() != null || localeHostMatch == -1) { + if (editedConfig.getLocaleQualifier() != null || localeHostMatch == -1) { // add all the locales start = 0; max = localeList.size(); @@ -287,8 +286,7 @@ public class ConfigurationMatcher { Locale l = localeList.get(i); ConfigBundle bundle = new ConfigBundle(); - bundle.config.setLanguageQualifier(l.language); - bundle.config.setRegionQualifier(l.region); + bundle.config.setLocaleQualifier(l.qualifier); bundle.localeIndex = i; configBundles.add(bundle); @@ -459,17 +457,15 @@ public class ConfigurationMatcher { final int count = localeList.size(); for (int l = 0; l < count; l++) { Locale locale = localeList.get(l); - LanguageQualifier langQ = locale.language; - RegionQualifier regionQ = locale.region; + LocaleQualifier qualifier = locale.qualifier; // there's always a ##/Other or ##/Any (which is the same, the region // contains FAKE_REGION_VALUE). If we don't find a perfect region match // we take the fake region. Since it's last in the list, this makes the // test easy. - if (langQ.getValue().equals(currentLanguage) && - (regionQ.getValue().equals(currentRegion) || - regionQ.getValue().equals(RegionQualifier.FAKE_REGION_VALUE))) { - return l; + if (qualifier.getLanguage().equals(currentLanguage) && + (qualifier.getRegion() == null || qualifier.getRegion().equals(currentRegion))) { + return l; } } @@ -766,7 +762,7 @@ public class ConfigurationMatcher { */ private static class PhoneConfigComparator implements Comparator<ConfigMatch> { - private SparseIntArray mDensitySort = new SparseIntArray(4); + private final SparseIntArray mDensitySort = new SparseIntArray(4); public PhoneConfigComparator() { // put the sort order for the density. diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/FlagManager.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/FlagManager.java index 484acb7..15623cf 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/FlagManager.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/FlagManager.java @@ -18,10 +18,9 @@ package com.android.ide.eclipse.adt.internal.editors.layout.configuration; import com.android.annotations.NonNull; import com.android.annotations.Nullable; import com.android.ide.common.resources.LocaleManager; -import com.android.ide.common.resources.configuration.LanguageQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; +import com.android.ide.common.resources.configuration.FolderConfiguration; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.ide.eclipse.adt.internal.editors.IconFactory; -import com.google.common.base.Splitter; import com.google.common.collect.Maps; import org.eclipse.swt.graphics.Image; @@ -62,7 +61,7 @@ public class FlagManager { } /** Map from region to flag icon */ - private Map<String, Image> mImageMap = Maps.newHashMap(); + private final Map<String, Image> mImageMap = Maps.newHashMap(); /** * Returns the empty flag icon used to indicate an unknown country @@ -140,16 +139,16 @@ public class FlagManager { * @param region the region, or null (if null, language must not be null), * @return a suitable flag icon, or null */ - public Image getFlag(LanguageQualifier language, RegionQualifier region) { - String languageCode = language != null ? language.getValue() : null; - String regionCode = region != null ? region.getValue() : null; - if (LanguageQualifier.FAKE_LANG_VALUE.equals(languageCode)) { + public Image getFlag(@Nullable LocaleQualifier locale) { + if (locale == null) { + return null; + } + String languageCode = locale.getLanguage(); + String regionCode = locale.getRegion(); + if (LocaleQualifier.FAKE_VALUE.equals(languageCode)) { languageCode = null; - } - if (RegionQualifier.FAKE_REGION_VALUE.equals(regionCode)) { - regionCode = null; - } - return getFlag(languageCode, regionCode); + } + return getFlag(languageCode, regionCode); } /** @@ -161,26 +160,28 @@ public class FlagManager { */ @Nullable public Image getFlagForFolderName(@NonNull String folder) { - RegionQualifier region = null; - LanguageQualifier language = null; - for (String qualifier : Splitter.on('-').split(folder)) { - if (qualifier.length() == 3) { - region = RegionQualifier.getQualifier(qualifier); - if (region != null) { - break; - } - } else if (qualifier.length() == 2 && language == null) { - language = LanguageQualifier.getQualifier(qualifier); - } - } - if (region != null || language != null) { - return FlagManager.get().getFlag(language, region); + FolderConfiguration configuration = FolderConfiguration.getConfigForFolder(folder); + if (configuration != null) { + return get().getFlag(configuration); } return null; } /** + * Returns the flag for the given folder + * + * @param configuration the folder configuration + * @return a suitable flag icon, or null + */ + @Nullable + public Image getFlag(@NonNull FolderConfiguration configuration) { + return getFlag(configuration.getLocaleQualifier()); + } + + + + /** * Returns the flag for the given region. * * @param region the 2 letter region code (ISO 3166-1 alpha-2), in upper case diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/Locale.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/Locale.java index 879efd7..6cb3963 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/Locale.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/Locale.java @@ -16,74 +16,94 @@ package com.android.ide.eclipse.adt.internal.editors.layout.configuration; -import static com.android.ide.common.resources.configuration.LanguageQualifier.FAKE_LANG_VALUE; -import static com.android.ide.common.resources.configuration.RegionQualifier.FAKE_REGION_VALUE; +import static com.android.ide.common.resources.configuration.LocaleQualifier.FAKE_VALUE; import com.android.annotations.NonNull; -import com.android.ide.common.resources.configuration.LanguageQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; -import com.google.common.base.Objects; +import com.android.annotations.Nullable; +import com.android.ide.common.resources.configuration.FolderConfiguration; +import com.android.ide.common.resources.configuration.LocaleQualifier; import org.eclipse.swt.graphics.Image; -/** A language,region pair */ +/** + * A language,region pair + */ public class Locale { - /** A special marker region qualifier representing any region */ - public static final RegionQualifier ANY_REGION = new RegionQualifier(FAKE_REGION_VALUE); - - /** A special marker language qualifier representing any language */ - public static final LanguageQualifier ANY_LANGUAGE = new LanguageQualifier(FAKE_LANG_VALUE); - - /** A locale which matches any language and region */ - public static final Locale ANY = new Locale(ANY_LANGUAGE, ANY_REGION); + /** + * A special marker region qualifier representing any region + */ + public static final LocaleQualifier ANY_QUALIFIER = new LocaleQualifier(FAKE_VALUE); - /** The language qualifier, or {@link #ANY_LANGUAGE} if this locale matches any language */ - @NonNull - public final LanguageQualifier language; + /** + * A locale which matches any language and region + */ + public static final Locale ANY = new Locale(ANY_QUALIFIER); - /** The language qualifier, or {@link #ANY_REGION} if this locale matches any region */ + /** + * The locale qualifier, or {@link #ANY_QUALIFIER} if this locale matches + * any locale + */ @NonNull - public final RegionQualifier region; + public final LocaleQualifier qualifier; /** - * Constructs a new {@linkplain Locale} matching a given language in a given locale. + * Constructs a new {@linkplain Locale} matching a given language in a given + * locale. * - * @param language the language - * @param region the region + * @param locale the locale */ - private Locale(@NonNull LanguageQualifier language, @NonNull RegionQualifier region) { - if (language.getValue().equals(FAKE_LANG_VALUE)) { - language = ANY_LANGUAGE; - } - if (region.getValue().equals(FAKE_REGION_VALUE)) { - region = ANY_REGION; - } - this.language = language; - this.region = region; + private Locale(@NonNull + LocaleQualifier locale) { + qualifier = locale; } /** - * Constructs a new {@linkplain Locale} matching a given language in a given specific locale. + * Constructs a new {@linkplain Locale} matching a given language in a given + * specific locale. * - * @param language the language - * @param region the region - * @return a locale with the given language and region + * @param locale the locale + * @return a locale with the given locale */ @NonNull - public static Locale create( - @NonNull LanguageQualifier language, - @NonNull RegionQualifier region) { - return new Locale(language, region); + public static Locale create(@NonNull + LocaleQualifier locale) { + return new Locale(locale); } /** - * Constructs a new {@linkplain Locale} for the given language, matching any regions. + * Constructs a new {@linkplain Locale} for the given folder configuration * - * @param language the language + * @param folder the folder configuration * @return a locale with the given language and region */ - public static Locale create(@NonNull LanguageQualifier language) { - return new Locale(language, ANY_REGION); + public static Locale create(FolderConfiguration folder) { + LocaleQualifier locale = folder.getLocaleQualifier(); + if (locale == null) { + return ANY; + } else { + return new Locale(locale); + } + } + + /** + * Constructs a new {@linkplain Locale} for the given locale string, e.g. + * "zh", "en-rUS", or "b+eng+US". + * + * @param localeString the locale description + * @return the corresponding locale + */ + @NonNull + public static Locale create(@NonNull + String localeString) { + // Load locale. Note that this can get overwritten by the + // project-wide settings read below. + + LocaleQualifier qualifier = LocaleQualifier.getQualifier(localeString); + if (qualifier != null) { + return new Locale(qualifier); + } else { + return ANY; + } } /** @@ -93,19 +113,17 @@ public class Locale { */ @NonNull public Image getFlagImage() { - Image image = null; - String languageCode = hasLanguage() ? language.getValue() : null; - String regionCode = hasRegion() ? region.getValue() : null; - if (languageCode == null && regionCode == null) { + String languageCode = qualifier.hasLanguage() ? qualifier.getLanguage() : null; + if (languageCode == null) { return FlagManager.getGlobeIcon(); - } else { - FlagManager icons = FlagManager.get(); - image = icons.getFlag(languageCode, regionCode); - if (image == null) { - image = FlagManager.getEmptyIcon(); - } - + } + String regionCode = hasRegion() ? qualifier.getRegion() : null; + FlagManager icons = FlagManager.get(); + Image image = icons.getFlag(languageCode, regionCode); + if (image != null) { return image; + } else { + return FlagManager.getGlobeIcon(); } } @@ -116,7 +134,7 @@ public class Locale { * @return true if this locale specifies a specific language */ public boolean hasLanguage() { - return language != ANY_LANGUAGE; + return !qualifier.hasFakeValue(); } /** @@ -125,20 +143,28 @@ public class Locale { * @return true if this locale specifies a region */ public boolean hasRegion() { - return region != ANY_REGION; + return qualifier.getRegion() != null && !FAKE_VALUE.equals(qualifier.getRegion()); + } + + /** + * Returns the locale formatted as language-region. If region is not set, + * language is returned. If language is not set, empty string is returned. + */ + public String toLocaleId() { + return qualifier == ANY_QUALIFIER ? "" : qualifier.getTag(); } @Override public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((language == null) ? 0 : language.hashCode()); - result = prime * result + ((region == null) ? 0 : region.hashCode()); + result = prime * result + qualifier.hashCode(); return result; } @Override - public boolean equals(Object obj) { + public boolean equals(@Nullable + Object obj) { if (this == obj) return true; if (obj == null) @@ -146,36 +172,13 @@ public class Locale { if (getClass() != obj.getClass()) return false; Locale other = (Locale) obj; - if (language == null) { - if (other.language != null) - return false; - } else if (!language.equals(other.language)) - return false; - if (region == null) { - if (other.region != null) - return false; - } else if (!region.equals(other.region)) + if (!qualifier.equals(other.qualifier)) return false; return true; } @Override public String toString() { - return Objects.toStringHelper(this).omitNullValues() - .addValue(language.getValue()) - .addValue(region.getValue()) - .toString(); - } - - /** - * Returns the locale formatted as language-region. If region is not set, - * language is returned. If language is not set, empty string is returned. - */ - public String toLocaleId() { - // Return lang-reg only if both lang and reg are present. Else return - // lang. - return hasLanguage() && hasRegion() ? - language.getValue() + "-" + region.getValue() - : hasLanguage() ? language.getValue() : ""; + return qualifier.getTag(); } } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderPreviewManager.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderPreviewManager.java index 9f6c3a2..98dde86 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderPreviewManager.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderPreviewManager.java @@ -33,7 +33,7 @@ import com.android.ide.common.rendering.api.Capability; import com.android.ide.common.resources.configuration.DensityQualifier; import com.android.ide.common.resources.configuration.DeviceConfigHelper; import com.android.ide.common.resources.configuration.FolderConfiguration; -import com.android.ide.common.resources.configuration.LanguageQualifier; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.ide.common.resources.configuration.ScreenSizeQualifier; import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.AdtUtils; @@ -800,10 +800,10 @@ public class RenderPreviewManager { } private void createLocaleVariation(ConfigurationChooser chooser, Configuration parent) { - LanguageQualifier currentLanguage = parent.getLocale().language; + LocaleQualifier currentLanguage = parent.getLocale().qualifier; for (Locale locale : chooser.getLocaleList()) { - LanguageQualifier language = locale.language; - if (!language.equals(currentLanguage)) { + LocaleQualifier qualifier = locale.qualifier; + if (!qualifier.getLanguage().equals(currentLanguage.getLanguage())) { VaryingConfiguration configuration = VaryingConfiguration.create(chooser, parent); configuration.setAlternateLocale(true); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderService.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderService.java index ffcb258..3b9e2fc 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderService.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderService.java @@ -24,6 +24,7 @@ import com.android.ide.common.api.Rect; import com.android.ide.common.rendering.HardwareConfigHelper; import com.android.ide.common.rendering.LayoutLibrary; import com.android.ide.common.rendering.RenderSecurityManager; +import com.android.ide.common.rendering.api.AssetRepository; import com.android.ide.common.rendering.api.Capability; import com.android.ide.common.rendering.api.DrawableParams; import com.android.ide.common.rendering.api.HardwareConfig; @@ -471,6 +472,7 @@ public class RenderService { params.setExtendedViewInfoMode(true); params.setLocale(mLocale.toLocaleId()); + params.setAssetRepository(new AssetRepository()); ManifestInfo manifestInfo = ManifestInfo.get(mProject); try { @@ -546,6 +548,7 @@ public class RenderService { DrawableParams params = new DrawableParams(drawableResourceValue, mProject, hardwareConfig, mResourceResolver, mProjectCallback, mMinSdkVersion, mTargetSdkVersion, mLogger); + params.setAssetRepository(new AssetRepository()); params.setForceNoDecor(); Result result = mLayoutLib.renderDrawable(params); if (result != null && result.isSuccess()) { @@ -619,6 +622,7 @@ public class RenderService { mLogger); params.setLayoutOnly(); params.setForceNoDecor(); + params.setAssetRepository(new AssetRepository()); RenderSession session = null; mProjectCallback.setLogger(mLogger); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/runtime/RemoteAdtTestRunner.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/runtime/RemoteAdtTestRunner.java index 1205372..a48acd3 100755 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/runtime/RemoteAdtTestRunner.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/runtime/RemoteAdtTestRunner.java @@ -448,20 +448,27 @@ public class RemoteAdtTestRunner extends RemoteTestRunner { } @Override - public void testFailed(TestFailure status, TestIdentifier test, String trace) { - String statusString; - if (status == TestFailure.ERROR) { - statusString = MessageIds.TEST_ERROR; - } else { - statusString = MessageIds.TEST_FAILED; - } + public void testFailed(TestIdentifier test, String trace) { + TestReferenceFailure failure = + new TestReferenceFailure(new TestCaseReference(mDeviceName, test), + MessageIds.TEST_FAILED, trace, null); + mNotifier.testFailed(failure); + } + + @Override + public void testAssumptionFailure(TestIdentifier test, String trace) { TestReferenceFailure failure = new TestReferenceFailure(new TestCaseReference(mDeviceName, test), - statusString, trace, null); + MessageIds.TEST_FAILED, trace, null); mNotifier.testFailed(failure); } @Override + public void testIgnored(TestIdentifier test) { + // TODO: implement me? + } + + @Override public synchronized void testRunEnded(long elapsedTime, Map<String, String> runMetrics) { mNotifier.testRunEnded(mDeviceName, elapsedTime); AdtPlugin.printToConsole(mLaunchInfo.getProject(), diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/runtime/TestCollector.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/runtime/TestCollector.java index 806f289..32c5ef8 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/runtime/TestCollector.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/runtime/TestCollector.java @@ -46,10 +46,26 @@ class TestCollector implements ITestRunListener { } /* (non-Javadoc) - * @see com.android.ddmlib.testrunner.ITestRunListener#testFailed(com.android.ddmlib.testrunner.ITestRunListener.TestFailure, com.android.ddmlib.testrunner.TestIdentifier, java.lang.String) + * @see com.android.ddmlib.testrunner.ITestRunListener#testFailed(com.android.ddmlib.testrunner.TestIdentifier, java.lang.String) */ @Override - public synchronized void testFailed(TestFailure status, TestIdentifier test, String trace) { + public synchronized void testFailed(TestIdentifier test, String trace) { + // ignore - should be impossible since this is only collecting test information + } + + /* (non-Javadoc) + * @see com.android.ddmlib.testrunner.ITestRunListener#testIgnored(com.android.ddmlib.testrunner.TestIdentifier) + */ + @Override + public synchronized void testIgnored(TestIdentifier test) { + // ignore - should be impossible since this is only collecting test information + } + + /* (non-Javadoc) + * @see com.android.ddmlib.testrunner.ITestRunListener#testAssumptionFailure(com.android.ddmlib.testrunner.TestIdentifier, java.lang.String) + */ + @Override + public synchronized void testAssumptionFailure(TestIdentifier test, String trace) { // ignore - should be impossible since this is only collecting test information } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/EclipseLintClient.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/EclipseLintClient.java index 54222e3..94a7da1 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/EclipseLintClient.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/EclipseLintClient.java @@ -49,6 +49,7 @@ import com.android.tools.lint.detector.api.Location.Handle; import com.android.tools.lint.detector.api.Position; import com.android.tools.lint.detector.api.Project; import com.android.tools.lint.detector.api.Severity; +import com.android.tools.lint.detector.api.TextFormat; import com.android.tools.lint.detector.api.XmlContext; import com.android.utils.Pair; import com.android.utils.SdkUtils; @@ -379,7 +380,8 @@ public class EclipseLintClient extends LintClient { @Override public void report(@NonNull Context context, @NonNull Issue issue, @NonNull Severity s, @Nullable Location location, - @NonNull String message, @Nullable Object data) { + @NonNull String message, @NonNull TextFormat format) { + message = format.toText(message); int severity = getMarkerSeverity(s); IMarker marker = null; if (location != null) { @@ -666,8 +668,8 @@ public class EclipseLintClient extends LintClient { return ""; } - String summary = issue.getDescription(Issue.OutputFormat.TEXT); - String explanation = issue.getExplanation(Issue.OutputFormat.TEXT); + String summary = issue.getBriefDescription(TextFormat.TEXT); + String explanation = issue.getExplanation(TextFormat.TEXT); StringBuilder sb = new StringBuilder(summary.length() + explanation.length() + 20); try { @@ -901,7 +903,7 @@ public class EclipseLintClient extends LintClient { * @return the issue registry to use to access detectors and issues */ public static IssueRegistry getRegistry() { - return new BuiltinIssueRegistry(); + return new EclipseLintIssueRegistry(); } @Override diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/EclipseLintIssueRegistry.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/EclipseLintIssueRegistry.java new file mode 100644 index 0000000..3abbdeb --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/EclipseLintIssueRegistry.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Eclipse Public License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.eclipse.org/org/documents/epl-v10.php + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.ide.eclipse.adt.internal.lint; + +import com.android.annotations.NonNull; +import com.android.tools.lint.checks.*; +import com.android.tools.lint.detector.api.Issue; + +import java.util.ArrayList; +import java.util.List; + +public class EclipseLintIssueRegistry extends BuiltinIssueRegistry { + private static List<Issue> sFilteredIssues; + + public EclipseLintIssueRegistry() { + } + + @NonNull + @Override + public List<Issue> getIssues() { + if (sFilteredIssues == null) { + // Remove issues that do not work properly in Eclipse + List<Issue> sIssues = super.getIssues(); + List<Issue> result = new ArrayList<Issue>(sIssues.size()); + for (Issue issue : sIssues) { + if (issue == MissingClassDetector.INSTANTIATABLE) { + // Apparently violated by + // android.support.v7.internal.widget.ActionBarView.HomeView + // See issue 72760 + continue; + } else if (issue == DuplicateIdDetector.WITHIN_LAYOUT) { + // Apparently violated by + // sdk/extras/android/support/v7/appcompat/abc_activity_chooser_view_include.xml + // See issue 72760 + continue; + } else if (issue == AppCompatResourceDetector.ISSUE + || issue == AppCompatCallDetector.ISSUE) { + // Apparently has some false positives in Eclipse; see issue + // 72824 + continue; + } else if (issue.getImplementation().getDetectorClass() == RtlDetector.class) { + // False positives in Eclipse; see issue 78780 + continue; + } + result.add(issue); + } + sFilteredIssues = result; + } + + return sFilteredIssues; + } +} diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/GlobalLintConfiguration.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/GlobalLintConfiguration.java index 5870501..2f0261e 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/GlobalLintConfiguration.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/GlobalLintConfiguration.java @@ -96,8 +96,7 @@ class GlobalLintConfiguration extends Configuration { @Override public void ignore(@NonNull Context context, @NonNull Issue issue, - @Nullable Location location, @NonNull String message, - @Nullable Object data) { + @Nullable Location location, @NonNull String message) { throw new UnsupportedOperationException( "Can't ignore() in global configurations"); //$NON-NLS-1$ } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintFix.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintFix.java index 658e409..366e949 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintFix.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintFix.java @@ -37,7 +37,7 @@ import com.android.tools.lint.checks.TypographyDetector; import com.android.tools.lint.checks.UseCompoundDrawableDetector; import com.android.tools.lint.checks.UselessViewDetector; import com.android.tools.lint.detector.api.Issue; -import com.android.tools.lint.detector.api.Issue.OutputFormat; +import com.android.tools.lint.detector.api.TextFormat; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; @@ -110,7 +110,7 @@ abstract class LintFix implements ICompletionProposal { public String getAdditionalProposalInfo() { Issue issue = EclipseLintClient.getRegistry().getIssue(mId); if (issue != null) { - return issue.getExplanation(OutputFormat.HTML); + return issue.getExplanation(TextFormat.HTML); } return null; diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintFixGenerator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintFixGenerator.java index ce5fd55..da10085 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintFixGenerator.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintFixGenerator.java @@ -27,7 +27,7 @@ import com.android.tools.lint.client.api.Configuration; import com.android.tools.lint.client.api.DefaultConfiguration; import com.android.tools.lint.client.api.IssueRegistry; import com.android.tools.lint.detector.api.Issue; -import com.android.tools.lint.detector.api.Issue.OutputFormat; +import com.android.tools.lint.detector.api.TextFormat; import com.android.tools.lint.detector.api.Project; import com.android.tools.lint.detector.api.Severity; import com.android.utils.SdkUtils; @@ -489,12 +489,12 @@ public class LintFixGenerator implements IMarkerResolutionGenerator2, IQuickAssi sb.append('\n').append('\n'); sb.append("Issue Explanation:"); sb.append('\n'); - String explanation = issue.getExplanation(Issue.OutputFormat.TEXT); + String explanation = issue.getExplanation(TextFormat.TEXT); if (explanation != null && !explanation.isEmpty()) { sb.append('\n'); sb.append(explanation); } else { - sb.append(issue.getDescription(Issue.OutputFormat.TEXT)); + sb.append(issue.getBriefDescription(TextFormat.TEXT)); } if (issue.getMoreInfo() != null) { @@ -546,7 +546,7 @@ public class LintFixGenerator implements IMarkerResolutionGenerator2, IQuickAssi return "Provides more information about this issue." + "<br><br>" //$NON-NLS-1$ + EclipseLintClient.getRegistry().getIssue(mId).getExplanation( - OutputFormat.HTML); + TextFormat.HTML); } @Override diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/TypoFix.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/TypoFix.java index 8a83364..7cc05d2 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/TypoFix.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/TypoFix.java @@ -17,6 +17,7 @@ package com.android.ide.eclipse.adt.internal.lint; import com.android.ide.eclipse.adt.AdtPlugin; import com.android.tools.lint.checks.TypoDetector; +import com.android.tools.lint.detector.api.TextFormat; import org.eclipse.core.resources.IMarker; import org.eclipse.jface.text.BadLocationException; @@ -58,11 +59,11 @@ final class TypoFix extends DocumentFix { protected void apply(IDocument document, IStructuredModel model, Node node, int start, int end) { String message = mMarker.getAttribute(IMarker.MESSAGE, ""); - String typo = TypoDetector.getTypo(message); + String typo = TypoDetector.getTypo(message, TextFormat.TEXT); if (typo == null) { return; } - List<String> replacements = TypoDetector.getSuggestions(message); + List<String> replacements = TypoDetector.getSuggestions(message, TextFormat.TEXT); if (replacements == null || replacements.isEmpty()) { return; } @@ -103,8 +104,8 @@ final class TypoFix extends DocumentFix { @Override protected List<LintFix> getAllFixes() { String message = mMarker.getAttribute(IMarker.MESSAGE, ""); - String typo = TypoDetector.getTypo(message); - List<String> replacements = TypoDetector.getSuggestions(message); + String typo = TypoDetector.getTypo(message, TextFormat.TEXT); + List<String> replacements = TypoDetector.getSuggestions(message, TextFormat.TEXT); if (replacements != null && !replacements.isEmpty() && typo != null) { List<LintFix> allFixes = new ArrayList<LintFix>(replacements.size()); for (String replacement : replacements) { diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/LintPreferencePage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/LintPreferencePage.java index 02af2fd..5cb94ba 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/LintPreferencePage.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/preferences/LintPreferencePage.java @@ -15,8 +15,8 @@ */ package com.android.ide.eclipse.adt.internal.preferences; -import static com.android.tools.lint.detector.api.Issue.OutputFormat.RAW; -import static com.android.tools.lint.detector.api.Issue.OutputFormat.TEXT; +import static com.android.tools.lint.detector.api.TextFormat.RAW; +import static com.android.tools.lint.detector.api.TextFormat.TEXT; import com.android.annotations.NonNull; import com.android.ide.eclipse.adt.AdtPlugin; @@ -30,6 +30,7 @@ import com.android.tools.lint.detector.api.Category; import com.android.tools.lint.detector.api.Issue; import com.android.tools.lint.detector.api.Project; import com.android.tools.lint.detector.api.Severity; +import com.android.tools.lint.detector.api.TextFormat; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IWorkspace; @@ -451,8 +452,8 @@ public class LintPreferencePage extends PropertyPage implements IWorkbenchPrefer Object data = item != null ? item.getData() : null; if (data instanceof Issue) { Issue issue = (Issue) data; - String summary = issue.getDescription(Issue.OutputFormat.TEXT); - String explanation = issue.getExplanation(Issue.OutputFormat.TEXT); + String summary = issue.getBriefDescription(TextFormat.TEXT); + String explanation = issue.getExplanation(TextFormat.TEXT); StringBuilder sb = new StringBuilder(summary.length() + explanation.length() + 20); sb.append(summary); @@ -571,7 +572,7 @@ public class LintPreferencePage extends PropertyPage implements IWorkbenchPrefer || issue.getCategory().getName().toLowerCase(Locale.US).startsWith(filter) || issue.getCategory().getFullName().toLowerCase(Locale.US).startsWith(filter) || issue.getId().toLowerCase(Locale.US).contains(filter) - || issue.getDescription(RAW).toLowerCase(Locale.US).contains(filter); + || issue.getBriefDescription(RAW).toLowerCase(Locale.US).contains(filter); } private class ContentProvider extends TreeNodeContentProvider { @@ -715,7 +716,7 @@ public class LintPreferencePage extends PropertyPage implements IWorkbenchPrefer case 0: return issue.getId(); case 1: - return issue.getDescription(TEXT); + return issue.getBriefDescription(TEXT); } return null; diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/ResourceHelper.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/ResourceHelper.java index 8da18dd..b0e3d43 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/ResourceHelper.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/ResourceHelper.java @@ -40,13 +40,12 @@ import com.android.ide.common.resources.configuration.CountryCodeQualifier; import com.android.ide.common.resources.configuration.DensityQualifier; import com.android.ide.common.resources.configuration.FolderConfiguration; import com.android.ide.common.resources.configuration.KeyboardStateQualifier; -import com.android.ide.common.resources.configuration.LanguageQualifier; import com.android.ide.common.resources.configuration.LayoutDirectionQualifier; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.ide.common.resources.configuration.NavigationMethodQualifier; import com.android.ide.common.resources.configuration.NavigationStateQualifier; import com.android.ide.common.resources.configuration.NetworkCodeQualifier; import com.android.ide.common.resources.configuration.NightModeQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; import com.android.ide.common.resources.configuration.ResourceQualifier; import com.android.ide.common.resources.configuration.ScreenDimensionQualifier; import com.android.ide.common.resources.configuration.ScreenHeightQualifier; @@ -127,8 +126,7 @@ public class ResourceHelper { IconFactory factory = IconFactory.getInstance(); sIconMap.put(CountryCodeQualifier.class, factory.getIcon("mcc")); //$NON-NLS-1$ sIconMap.put(NetworkCodeQualifier.class, factory.getIcon("mnc")); //$NON-NLS-1$ - sIconMap.put(LanguageQualifier.class, factory.getIcon("language")); //$NON-NLS-1$ - sIconMap.put(RegionQualifier.class, factory.getIcon("region")); //$NON-NLS-1$ + sIconMap.put(LocaleQualifier.class, factory.getIcon("language")); //$NON-NLS-1$ sIconMap.put(LayoutDirectionQualifier.class, factory.getIcon("bidi")); //$NON-NLS-1$ sIconMap.put(ScreenSizeQualifier.class, factory.getIcon("size")); //$NON-NLS-1$ sIconMap.put(ScreenRatioQualifier.class, factory.getIcon("ratio")); //$NON-NLS-1$ diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectClassLoader.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectClassLoader.java index 38460a4..e07f099 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectClassLoader.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectClassLoader.java @@ -177,7 +177,7 @@ public final class ProjectClassLoader extends ClassLoader { public static byte[] rewriteClass(byte[] classData, final int maxVersion, final int minVersion) { assert maxVersion >= minVersion; ClassWriter classWriter = new ClassWriter(0); - ClassVisitor classVisitor = new ClassVisitor(Opcodes.ASM4, classWriter) { + ClassVisitor classVisitor = new ClassVisitor(Opcodes.ASM5, classWriter) { @Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java index 8e40f1c..7ff06fc 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java @@ -744,11 +744,11 @@ public final class Sdk { } AdtPlugin.log(t, "Exception in checkAndLoadTargetData."); //$NON-NLS-1$ - return new Status(IStatus.ERROR, AdtPlugin.PLUGIN_ID, - String.format( - "Parsing Data for %1$s failed", //$NON-NLS-1$ - target.hashString()), - t); + String message = String.format("Parsing Data for %1$s failed", target.hashString()); + if (t instanceof UnsupportedClassVersionError) { + message = "To use this platform, run Eclipse with JDK 7 or later. (" + message + ")"; + } + return new Status(IStatus.ERROR, AdtPlugin.PLUGIN_ID, message, t); } } }; diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/ui/ConfigurationSelector.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/ui/ConfigurationSelector.java index 9d7ade6..44f9082 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/ui/ConfigurationSelector.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/ui/ConfigurationSelector.java @@ -22,13 +22,12 @@ import com.android.ide.common.resources.configuration.CountryCodeQualifier; import com.android.ide.common.resources.configuration.DensityQualifier; import com.android.ide.common.resources.configuration.FolderConfiguration; import com.android.ide.common.resources.configuration.KeyboardStateQualifier; -import com.android.ide.common.resources.configuration.LanguageQualifier; import com.android.ide.common.resources.configuration.LayoutDirectionQualifier; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.ide.common.resources.configuration.NavigationMethodQualifier; import com.android.ide.common.resources.configuration.NavigationStateQualifier; import com.android.ide.common.resources.configuration.NetworkCodeQualifier; import com.android.ide.common.resources.configuration.NightModeQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; import com.android.ide.common.resources.configuration.ResourceQualifier; import com.android.ide.common.resources.configuration.ScreenDimensionQualifier; import com.android.ide.common.resources.configuration.ScreenHeightQualifier; @@ -94,8 +93,8 @@ import org.eclipse.swt.widgets.Text; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Locale; -import java.util.Set; /** * Custom UI widget to let user build a Folder configuration. @@ -173,7 +172,7 @@ public class ConfigurationSelector extends Composite { @Override public void verifyText(VerifyEvent e) { // check for length - if (e.text.length() - e.end + e.start + ((Combo)e.getSource()).getText().length() > 2) { + if (e.text.length() - e.end + e.start + ((Combo)e.getSource()).getText().length() > 6) { e.doit = false; return; } @@ -181,6 +180,18 @@ public class ConfigurationSelector extends Composite { // check for lower case only. for (int i = 0 ; i < e.text.length(); i++) { char letter = e.text.charAt(i); + if (letter == '-') { + if (i+e.start != 2) { + e.doit = false; + return; + } else { + continue; + } + } + if (i+e.start == 3 && letter != 'r') { + e.doit = false; + return; + } if ((letter < 'a' || letter > 'z') && (letter < 'A' || letter > 'Z')) { e.doit = false; return; @@ -433,8 +444,7 @@ public class ConfigurationSelector extends Composite { // ResourceQualifer class. mUiMap.put(CountryCodeQualifier.class, new MCCEdit(mQualifierEditParent)); mUiMap.put(NetworkCodeQualifier.class, new MNCEdit(mQualifierEditParent)); - mUiMap.put(LanguageQualifier.class, new LanguageEdit(mQualifierEditParent)); - mUiMap.put(RegionQualifier.class, new RegionEdit(mQualifierEditParent)); + mUiMap.put(LocaleQualifier.class, new LocaleEdit(mQualifierEditParent)); mUiMap.put(LayoutDirectionQualifier.class, new LayoutDirectionEdit(mQualifierEditParent)); mUiMap.put(SmallestScreenWidthQualifier.class, @@ -551,10 +561,6 @@ public class ConfigurationSelector extends Composite { return ConfigurationState.INVALID_CONFIG; } - if (mSelectedConfiguration.checkRegion() == false) { - return ConfigurationState.REGION_WITHOUT_LANGUAGE; - } - return ConfigurationState.OK; } @@ -663,7 +669,7 @@ public class ConfigurationSelector extends Composite { if (element instanceof ResourceQualifier) { if (mShowQualifierValue) { String value = ((ResourceQualifier)element).getShortDisplayValue(); - if (value.length() == 0) { + if (value == null || value.length() == 0) { return String.format("%1$s (?)", ((ResourceQualifier)element).getShortName()); } else { @@ -730,7 +736,7 @@ public class ConfigurationSelector extends Composite { */ private class MCCEdit extends QualifierEditBase { - private Text mText; + private final Text mText; public MCCEdit(Composite parent) { super(parent, CountryCodeQualifier.NAME); @@ -797,7 +803,7 @@ public class ConfigurationSelector extends Composite { * Edit widget for {@link NetworkCodeQualifier}. */ private class MNCEdit extends QualifierEditBase { - private Text mText; + private final Text mText; public MNCEdit(Composite parent) { super(parent, NetworkCodeQualifier.NAME); @@ -862,15 +868,15 @@ public class ConfigurationSelector extends Composite { /** * Edit widget for {@link LanguageQualifier}. */ - private class LanguageEdit extends QualifierEditBase { - private Combo mLanguage; - private Label mName; + private class LocaleEdit extends QualifierEditBase { + private final Combo mLanguage; + private final Label mName; - public LanguageEdit(Composite parent) { - super(parent, LanguageQualifier.NAME); + public LocaleEdit(Composite parent) { + super(parent, LocaleQualifier.NAME); mLanguage = new Combo(this, SWT.DROP_DOWN); - Set<String> codes = LocaleManager.getLanguageCodes(); + List<String> codes = LocaleManager.getLanguageCodes(); String[] items = codes.toArray(new String[codes.size()]); Arrays.sort(items); mLanguage.setItems(items); @@ -894,7 +900,7 @@ public class ConfigurationSelector extends Composite { } }); - new Label(this, SWT.NONE).setText("(2 letter code)"); + new Label(this, SWT.NONE).setText("(2 letter code or language-rRegion)"); mName = new Label(this, SWT.NONE); mName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -918,19 +924,14 @@ public class ConfigurationSelector extends Composite { // empty string, means no qualifier. // Since the qualifier classes are immutable, and we don't want to // remove the qualifier from the configuration, we create a new default one. - mSelectedConfiguration.setLanguageQualifier(new LanguageQualifier()); + mSelectedConfiguration.setLocaleQualifier(new LocaleQualifier()); } else { - LanguageQualifier qualifier = null; - String segment = LanguageQualifier.getFolderSegment(value); - if (segment != null) { - qualifier = LanguageQualifier.getQualifier(segment); - } - + LocaleQualifier qualifier = LocaleQualifier.getQualifier(value); if (qualifier != null) { - mSelectedConfiguration.setLanguageQualifier(qualifier); + mSelectedConfiguration.setLocaleQualifier(qualifier); } else { // Failure! Looks like the value is wrong (for instance a one letter string). - mSelectedConfiguration.setLanguageQualifier(new LanguageQualifier()); + mSelectedConfiguration.setLocaleQualifier(new LocaleQualifier()); } } @@ -940,7 +941,7 @@ public class ConfigurationSelector extends Composite { @Override public void setQualifier(ResourceQualifier qualifier) { - LanguageQualifier q = (LanguageQualifier)qualifier; + LocaleQualifier q = (LocaleQualifier)qualifier; String value = q.getValue(); if (value != null) { @@ -950,82 +951,11 @@ public class ConfigurationSelector extends Composite { } /** - * Edit widget for {@link RegionQualifier}. - */ - private class RegionEdit extends QualifierEditBase { - private Combo mRegion; - - public RegionEdit(Composite parent) { - super(parent, RegionQualifier.NAME); - - mRegion = new Combo(this, SWT.DROP_DOWN); - mRegion.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - mRegion.addVerifyListener(new LanguageRegionVerifier()); - mRegion.addSelectionListener(new SelectionListener() { - @Override - public void widgetDefaultSelected(SelectionEvent e) { - onRegionChange(); - } - @Override - public void widgetSelected(SelectionEvent e) { - onRegionChange(); - } - }); - mRegion.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - onRegionChange(); - } - }); - - new Label(this, SWT.NONE).setText("(2 letter code)"); - } - - private void onRegionChange() { - // update the current config - String value = mRegion.getText(); - - if (value.length() == 0) { - // empty string, means no qualifier. - // Since the qualifier classes are immutable, and we don't want to - // remove the qualifier from the configuration, we create a new default one. - mSelectedConfiguration.setRegionQualifier(new RegionQualifier()); - } else { - RegionQualifier qualifier = null; - String segment = RegionQualifier.getFolderSegment(value); - if (segment != null) { - qualifier = RegionQualifier.getQualifier(segment); - } - - if (qualifier != null) { - mSelectedConfiguration.setRegionQualifier(qualifier); - } else { - // Failure! Looks like the value is wrong (for instance a one letter string). - mSelectedConfiguration.setRegionQualifier(new RegionQualifier()); - } - } - - // notify of change - onChange(true /* keepSelection */); - } - - @Override - public void setQualifier(ResourceQualifier qualifier) { - RegionQualifier q = (RegionQualifier)qualifier; - - String value = q.getValue(); - if (value != null) { - mRegion.setText(q.getValue()); - } - } - } - - /** * Edit widget for {@link LayoutDirectionQualifier}. */ private class LayoutDirectionEdit extends QualifierEditBase { - private Combo mDirection; + private final Combo mDirection; public LayoutDirectionEdit(Composite parent) { super(parent, LayoutDirectionQualifier.NAME); @@ -1084,7 +1014,7 @@ public class ConfigurationSelector extends Composite { */ private class SmallestScreenWidthEdit extends QualifierEditBase { - private Text mSize; + private final Text mSize; public SmallestScreenWidthEdit(Composite parent) { super(parent, SmallestScreenWidthQualifier.NAME); @@ -1152,7 +1082,7 @@ public class ConfigurationSelector extends Composite { */ private class ScreenWidthEdit extends QualifierEditBase { - private Text mSize; + private final Text mSize; public ScreenWidthEdit(Composite parent) { super(parent, ScreenWidthQualifier.NAME); @@ -1218,7 +1148,7 @@ public class ConfigurationSelector extends Composite { */ private class ScreenHeightEdit extends QualifierEditBase { - private Text mSize; + private final Text mSize; public ScreenHeightEdit(Composite parent) { super(parent, ScreenHeightQualifier.NAME); @@ -1285,7 +1215,7 @@ public class ConfigurationSelector extends Composite { */ private class ScreenSizeEdit extends QualifierEditBase { - private Combo mSize; + private final Combo mSize; public ScreenSizeEdit(Composite parent) { super(parent, ScreenSizeQualifier.NAME); @@ -1343,7 +1273,7 @@ public class ConfigurationSelector extends Composite { */ private class ScreenRatioEdit extends QualifierEditBase { - private Combo mRatio; + private final Combo mRatio; public ScreenRatioEdit(Composite parent) { super(parent, ScreenRatioQualifier.NAME); @@ -1401,7 +1331,7 @@ public class ConfigurationSelector extends Composite { */ private class OrientationEdit extends QualifierEditBase { - private Combo mOrientation; + private final Combo mOrientation; public OrientationEdit(Composite parent) { super(parent, ScreenOrientationQualifier.NAME); @@ -1459,7 +1389,7 @@ public class ConfigurationSelector extends Composite { */ private class UiModeEdit extends QualifierEditBase { - private Combo mUiMode; + private final Combo mUiMode; public UiModeEdit(Composite parent) { super(parent, UiModeQualifier.NAME); @@ -1516,7 +1446,7 @@ public class ConfigurationSelector extends Composite { */ private class NightModeEdit extends QualifierEditBase { - private Combo mNightMode; + private final Combo mNightMode; public NightModeEdit(Composite parent) { super(parent, NightModeQualifier.NAME); @@ -1573,7 +1503,7 @@ public class ConfigurationSelector extends Composite { * Edit widget for {@link DensityQualifier}. */ private class DensityEdit extends QualifierEditBase { - private Combo mDensity; + private final Combo mDensity; public DensityEdit(Composite parent) { super(parent, DensityQualifier.NAME); @@ -1631,7 +1561,7 @@ public class ConfigurationSelector extends Composite { */ private class TouchEdit extends QualifierEditBase { - private Combo mTouchScreen; + private final Combo mTouchScreen; public TouchEdit(Composite parent) { super(parent, TouchScreenQualifier.NAME); @@ -1688,7 +1618,7 @@ public class ConfigurationSelector extends Composite { */ private class KeyboardEdit extends QualifierEditBase { - private Combo mKeyboardState; + private final Combo mKeyboardState; public KeyboardEdit(Composite parent) { super(parent, KeyboardStateQualifier.NAME); @@ -1746,7 +1676,7 @@ public class ConfigurationSelector extends Composite { */ private class TextInputEdit extends QualifierEditBase { - private Combo mTextInput; + private final Combo mTextInput; public TextInputEdit(Composite parent) { super(parent, TextInputMethodQualifier.NAME); @@ -1804,7 +1734,7 @@ public class ConfigurationSelector extends Composite { */ private class NavigationStateEdit extends QualifierEditBase { - private Combo mNavigationState; + private final Combo mNavigationState; public NavigationStateEdit(Composite parent) { super(parent, NavigationStateQualifier.NAME); @@ -1862,7 +1792,7 @@ public class ConfigurationSelector extends Composite { */ private class NavigationEdit extends QualifierEditBase { - private Combo mNavigation; + private final Combo mNavigation; public NavigationEdit(Composite parent) { super(parent, NavigationMethodQualifier.NAME); @@ -1920,8 +1850,8 @@ public class ConfigurationSelector extends Composite { */ private class ScreenDimensionEdit extends QualifierEditBase { - private Text mSize1; - private Text mSize2; + private final Text mSize1; + private final Text mSize2; public ScreenDimensionEdit(Composite parent) { super(parent, ScreenDimensionQualifier.NAME); @@ -1995,7 +1925,7 @@ public class ConfigurationSelector extends Composite { * Edit widget for {@link VersionQualifier}. */ private class VersionEdit extends QualifierEditBase { - private Text mText; + private final Text mText; public VersionEdit(Composite parent) { super(parent, VersionQualifier.NAME); diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java index e749e71..d3df058 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/BuildFileCreator.java @@ -19,6 +19,8 @@ package com.android.ide.eclipse.adt.internal.wizards.exportgradle; import static com.android.SdkConstants.GRADLE_LATEST_VERSION; import static com.android.SdkConstants.GRADLE_PLUGIN_LATEST_VERSION; import static com.android.SdkConstants.GRADLE_PLUGIN_NAME; +import static com.android.tools.lint.checks.GradleDetector.APP_PLUGIN_ID; +import static com.android.tools.lint.checks.GradleDetector.LIB_PLUGIN_ID; import com.android.SdkConstants; import com.android.annotations.NonNull; @@ -79,7 +81,7 @@ public class BuildFileCreator { "tools/templates/gradle/wrapper"; //$NON-NLS-1$ static final String PLUGIN_CLASSPATH = "classpath '" + GRADLE_PLUGIN_NAME + GRADLE_PLUGIN_LATEST_VERSION + "'"; //$NON-NLS-1$ - static final String MAVEN_REPOSITORY = "mavenCentral()"; //$NON-NLS-1$ + static final String MAVEN_REPOSITORY = "jcenter()"; //$NON-NLS-1$ private static final String[] GRADLE_WRAPPER_FILES = new String[] { "gradlew", //$NON-NLS-1$ @@ -358,9 +360,9 @@ public class BuildFileCreator { */ private void appendHeader(boolean isLibrary) { if (isLibrary) { - mBuildFile.append("apply plugin: 'android-library'\n"); //$NON-NLS-1$ + mBuildFile.append("apply plugin: '").append(LIB_PLUGIN_ID).append("'\n"); //$NON-NLS-1$ //$NON-NLS-2$ } else { - mBuildFile.append("apply plugin: 'android'\n"); //$NON-NLS-1$ + mBuildFile.append("apply plugin: '").append(APP_PLUGIN_ID).append("'\n"); //$NON-NLS-1$ //$NON-NLS-2$ } mBuildFile.append("\n"); //$NON-NLS-1$ } @@ -634,7 +636,7 @@ public class BuildFileCreator { private static String getGradleDistributionUrl(@NonNull String gradleVersion, boolean binOnly) { String suffix = binOnly ? "bin" : "all"; - return String.format("http://services.gradle.org/distributions/gradle-%1$s-" + suffix + return String.format("https://services.gradle.org/distributions/gradle-%1$s-" + suffix + ".zip", gradleVersion); } } diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java index 9e976aa..bbfadf8 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/FinalPage.java @@ -96,7 +96,7 @@ public class FinalPage extends WizardPage { sb.append("Exported project: ").append(mBuilder.getCommonRoot().toOSString()); } - sb.append("\n\n").append("Choose 'import project' in Android Studio").append('\n'); + sb.append("\n\n").append("Choose 'Import Non-Android Studio project' in Android Studio").append('\n'); sb.append("and select the following file:").append("\n\t"); File bGradle = new File( diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java index 73d4937..cff9aca 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/exportgradle/ImportInsteadPage.java @@ -46,8 +46,7 @@ class ImportInsteadPage extends WizardPage { " to the new Gradle directory layout which better supports multiple resource directories.\n" + "- It can merge instrumentation test projects into the same project\n" + "- Android Studio is released more frequently than the ADT plugin, so the import\n" + - " mechanism more closely tracks the rapidly evolving requirements of Studio Gradle\n" + - " projects.\n" + + " mechanism more closely tracks the requirements of Studio Gradle projects.\n" + "\n" + "If you want to preserve your Eclipse directory structure, or if for some reason import\n" + "in Studio doesn't work (please let us know by filing a bug), continue to export from\n" + diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java index fcb3139..0301b80 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/AddTranslationDialog.java @@ -275,7 +275,7 @@ public class AddTranslationDialog extends Dialog implements ControlListener, Sel /** Populate the languages dropdown */ private void fillLanguages() { - Set<String> languageCodes = LocaleManager.getLanguageCodes(); + List<String> languageCodes = LocaleManager.getLanguageCodes(); List<String> labels = new ArrayList<String>(); for (String code : languageCodes) { labels.add(code + ": " + LocaleManager.getLanguageName(code)); //$NON-NLS-1$ @@ -291,7 +291,7 @@ public class AddTranslationDialog extends Dialog implements ControlListener, Sel // TODO: When you switch languages, offer some "default" usable options. For example, // when you choose English, offer the countries that use English, and so on. Unfortunately // we don't have good data about this, we'd just need to hardcode a few common cases. - Set<String> regionCodes = LocaleManager.getRegionCodes(); + List<String> regionCodes = LocaleManager.getRegionCodes(); List<String> labels = new ArrayList<String>(); for (String code : regionCodes) { labels.add(code + ": " + LocaleManager.getRegionName(code)); //$NON-NLS-1$ diff --git a/eclipse/plugins/com.android.ide.eclipse.base/.classpath b/eclipse/plugins/com.android.ide.eclipse.base/.classpath index fc77c11..0281bd9 100644 --- a/eclipse/plugins/com.android.ide.eclipse.base/.classpath +++ b/eclipse/plugins/com.android.ide.eclipse.base/.classpath @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry exported="true" kind="lib" path="libs/dvlib.jar" sourcepath="/dvlib"/> - <classpathentry exported="true" kind="lib" path="libs/common.jar" sourcepath="/common"/> - <classpathentry exported="true" kind="lib" path="libs/commons-codec-1.4.jar"/> - <classpathentry exported="true" kind="lib" path="libs/commons-compress-1.0.jar"/> - <classpathentry exported="true" kind="lib" path="libs/commons-logging-1.1.1.jar"/> - <classpathentry exported="true" kind="lib" path="libs/guava-15.0.jar"/> - <classpathentry exported="true" kind="lib" path="libs/httpclient-4.1.1.jar"/> - <classpathentry exported="true" kind="lib" path="libs/httpcore-4.1.jar"/> - <classpathentry exported="true" kind="lib" path="libs/kxml2-2.3.0.jar"/> - <classpathentry exported="true" kind="lib" path="libs/layoutlib-api.jar" sourcepath="/layoutlib-api"/> - <classpathentry exported="true" kind="lib" path="libs/sdklib.jar" sourcepath="/sdklib"/> - <classpathentry exported="true" kind="lib" path="libs/sdkstats.jar" sourcepath="/sdkstats"/> - <classpathentry exported="true" kind="lib" path="libs/sdk-common.jar" sourcepath="/sdk-common"/> - <classpathentry exported="true" kind="lib" path="libs/httpmime-4.1.jar"/> + <classpathentry exported="true" kind="lib" path="libs/dvlib.jar" sourcepath="/dvlib"/> + <classpathentry exported="true" kind="lib" path="libs/common.jar" sourcepath="/common"/> + <classpathentry exported="true" kind="lib" path="libs/commons-codec-1.4.jar"/> + <classpathentry exported="true" kind="lib" path="libs/commons-compress-1.0.jar"/> + <classpathentry exported="true" kind="lib" path="libs/commons-logging-1.1.1.jar"/> + <classpathentry exported="true" kind="lib" path="libs/guava-17.0.jar"/> + <classpathentry exported="true" kind="lib" path="libs/httpclient-4.1.1.jar"/> + <classpathentry exported="true" kind="lib" path="libs/httpcore-4.1.jar"/> + <classpathentry exported="true" kind="lib" path="libs/kxml2-2.3.0.jar"/> + <classpathentry exported="true" kind="lib" path="libs/layoutlib-api.jar" sourcepath="/layoutlib-api"/> + <classpathentry exported="true" kind="lib" path="libs/sdklib.jar" sourcepath="/sdklib"/> + <classpathentry exported="true" kind="lib" path="libs/sdkstats.jar" sourcepath="/sdkstats"/> + <classpathentry exported="true" kind="lib" path="libs/sdk-common.jar" sourcepath="/sdk-common"/> + <classpathentry exported="true" kind="lib" path="libs/httpmime-4.1.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> diff --git a/eclipse/plugins/com.android.ide.eclipse.base/.gitignore b/eclipse/plugins/com.android.ide.eclipse.base/.gitignore new file mode 100644 index 0000000..5e56e04 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.base/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF index e7c533c..6db8feb 100644 --- a/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.base/META-INF/MANIFEST.MF @@ -2,17 +2,18 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Common Android Utilities Bundle-SymbolicName: com.android.ide.eclipse.base;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime Bundle-ActivationPolicy: lazy Bundle-Vendor: The Android Open Source Project Bundle-ClassPath: ., + libs/annotations.jar, libs/common.jar, libs/commons-codec-1.4.jar, libs/commons-compress-1.0.jar, libs/commons-logging-1.1.1.jar, - libs/guava-15.0.jar, + libs/guava-17.0.jar, libs/httpclient-4.1.1.jar, libs/httpcore-4.1.jar, libs/httpmime-4.1.jar, @@ -26,16 +27,20 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: com.android, com.android.annotations, com.android.annotations.concurrency, + com.android.build, com.android.dvlib, + com.android.ide.common.build, com.android.ide.common.internal, com.android.ide.common.packaging, com.android.ide.common.rendering, com.android.ide.common.rendering.api, com.android.ide.common.rendering.legacy, + com.android.ide.common.repository, com.android.ide.common.res2, com.android.ide.common.resources, com.android.ide.common.resources.configuration, com.android.ide.common.sdk, + com.android.ide.common.signing, com.android.ide.common.xml, com.android.ide.eclipse.base, com.android.ide.eclipse.base.internal.preferences, @@ -46,6 +51,7 @@ Export-Package: com.android, com.android.sdklib, com.android.sdklib.build, com.android.sdklib.devices, + com.android.sdklib.internal.androidTarget, com.android.sdklib.internal.avd, com.android.sdklib.internal.build, com.android.sdklib.internal.project, @@ -69,14 +75,18 @@ Export-Package: com.android, com.google.common.base.internal, com.google.common.cache, com.google.common.collect, + com.google.common.escape, com.google.common.eventbus, com.google.common.hash, + com.google.common.html, com.google.common.io, com.google.common.math, com.google.common.net, com.google.common.primitives, com.google.common.reflect, com.google.common.util.concurrent, + com.google.common.xml, + com.google.thirdparty.publicsuffix, org.apache.commons.codec, org.apache.commons.codec.binary, org.apache.commons.codec.digest, @@ -84,14 +94,23 @@ Export-Package: com.android, org.apache.commons.codec.net, org.apache.commons.compress.archivers, org.apache.commons.compress.archivers.ar, + org.apache.commons.compress.archivers.arj, org.apache.commons.compress.archivers.cpio, + org.apache.commons.compress.archivers.dump, org.apache.commons.compress.archivers.jar, + org.apache.commons.compress.archivers.sevenz, org.apache.commons.compress.archivers.tar, org.apache.commons.compress.archivers.zip, org.apache.commons.compress.changes, org.apache.commons.compress.compressors, org.apache.commons.compress.compressors.bzip2, org.apache.commons.compress.compressors.gzip, + org.apache.commons.compress.compressors.lzma, + org.apache.commons.compress.compressors.pack200, + org.apache.commons.compress.compressors.snappy, + org.apache.commons.compress.compressors.xz, + org.apache.commons.compress.compressors.z, + org.apache.commons.compress.compressors.z._internal_, org.apache.commons.compress.utils, org.apache.commons.logging, org.apache.commons.logging.impl, diff --git a/eclipse/plugins/com.android.ide.eclipse.base/pom.xml b/eclipse/plugins/com.android.ide.eclipse.base/pom.xml index 8ecc091..dbce995 100644 --- a/eclipse/plugins/com.android.ide.eclipse.base/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.base/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.base</artifactId> <packaging>eclipse-plugin</packaging> <name>base</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/.classpath b/eclipse/plugins/com.android.ide.eclipse.ddms/.classpath index d5d21c8..97afc79 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ddms/.classpath +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/.classpath @@ -3,11 +3,11 @@ <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="lib" path="libs/jfreechart-1.0.9.jar"/> - <classpathentry kind="lib" path="libs/jcommon-1.0.12.jar"/> - <classpathentry kind="lib" path="libs/jfreechart-swt-1.0.9.jar"/> - <classpathentry exported="true" kind="lib" path="libs/ddmlib.jar" sourcepath="/ddmlib"/> - <classpathentry exported="true" kind="lib" path="libs/ddmuilib.jar" sourcepath="/ddmuilib"/> - <classpathentry exported="true" kind="lib" path="libs/uiautomatorviewer.jar" sourcepath="/uiautomatorviewer/src"/> + <classpathentry kind="lib" path="libs/jfreechart-1.0.9.jar"/> + <classpathentry kind="lib" path="libs/jcommon-1.0.12.jar"/> + <classpathentry kind="lib" path="libs/jfreechart-swt-1.0.9.jar"/> + <classpathentry exported="true" kind="lib" path="libs/ddmlib.jar" sourcepath="/ddmlib"/> + <classpathentry exported="true" kind="lib" path="libs/ddmuilib.jar" sourcepath="/ddmuilib"/> + <classpathentry exported="true" kind="lib" path="libs/uiautomatorviewer.jar" sourcepath="/uiautomatorviewer/src"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/.gitignore b/eclipse/plugins/com.android.ide.eclipse.ddms/.gitignore new file mode 100644 index 0000000..5e56e04 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.ddms/META-INF/MANIFEST.MF index 26b6d15..92ac9f1 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ddms/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.android.ide.eclipse.ddms;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Activator: com.android.ide.eclipse.ddms.DdmsPlugin Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/pom.xml b/eclipse/plugins/com.android.ide.eclipse.ddms/pom.xml index c5aae48..3f0f90c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ddms/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.ddms</artifactId> <packaging>eclipse-plugin</packaging> <name>ddms</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/systrace/SystraceOptionsDialogV2.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/systrace/SystraceOptionsDialogV2.java index 104804a..208ff38 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/systrace/SystraceOptionsDialogV2.java +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/systrace/SystraceOptionsDialogV2.java @@ -17,6 +17,9 @@ package com.android.ide.eclipse.ddms.systrace; import com.android.ddmuilib.TableHelper; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; import org.eclipse.jface.dialogs.TitleAreaDialog; import org.eclipse.swt.SWT; @@ -38,15 +41,16 @@ import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.Text; import java.io.File; -import java.util.HashSet; import java.util.List; import java.util.Set; public class SystraceOptionsDialogV2 extends TitleAreaDialog implements ISystraceOptionsDialog { - private static final String TITLE = "Android System Trace"; + private static final String TITLE = "Systrace (Android System Trace)"; private static final String DEFAULT_MESSAGE = "Settings to use while capturing system level trace"; private static final String DEFAULT_TRACE_FNAME = "trace.html"; //$NON-NLS-1$ + private static final Set<String> sCommonTags = ImmutableSet.of( + "app", "dalvik", "gfx", "res", "rs", "sched", "view", "webview"); private Text mDestinationText; private String mDestinationPath; @@ -55,21 +59,34 @@ public class SystraceOptionsDialogV2 extends TitleAreaDialog implements ISystrac private Combo mTraceAppCombo; private static String sSaveToFolder = System.getProperty("user.home"); //$NON-NLS-1$ - private static String sTraceDuration = ""; - private static String sTraceBufferSize = ""; - private static Set<String> sEnabledTags = new HashSet<String>(); + private static String sTraceDuration = "5"; + private static String sTraceBufferSize = "2048"; + private static Set<String> sEnabledTags = Sets.newHashSet(sCommonTags); private static String sLastSelectedApp = null; - private final List<SystraceTag> mSupportedTags; + private final List<SystraceTag> mCommonSupportedTags; + private final List<SystraceTag> mAdvancedSupportedTags; + private final List<String> mCurrentApps; private final SystraceOptions mOptions = new SystraceOptions(); - private Table mTable; + private Table mCommonTagsTable; + private Table mAdvancedTagsTable; public SystraceOptionsDialogV2(Shell parentShell, List<SystraceTag> tags, List<String> apps) { super(parentShell); - mSupportedTags = tags; mCurrentApps = apps; + + mCommonSupportedTags = Lists.newArrayListWithExpectedSize(tags.size()); + mAdvancedSupportedTags = Lists.newArrayListWithExpectedSize(tags.size()); + + for (SystraceTag supportedTag : tags) { + if (sCommonTags.contains(supportedTag.tag)) { + mCommonSupportedTags.add(supportedTag); + } else { + mAdvancedSupportedTags.add(supportedTag); + } + } } @Override @@ -150,31 +167,38 @@ public class SystraceOptionsDialogV2 extends TitleAreaDialog implements ISystrac mTraceBufferSizeText.addModifyListener(m); mTraceDurationText.addModifyListener(m); - l = new Label(c, SWT.NONE); - l.setText("Select tags to enable: "); + mCommonTagsTable = createTable(c, "Commonly Used Tags: ", mCommonSupportedTags); + mAdvancedTagsTable = createTable(c, "Advanced Options: ", mAdvancedSupportedTags); + + return c; + } + + private Table createTable(Composite c, String label, List<SystraceTag> supportedTags) { + Label l = new Label(c, SWT.NONE); + l.setText(label); l.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); - mTable = new Table(c, SWT.CHECK | SWT.BORDER); - gd = new GridData(GridData.FILL_BOTH); + Table table = new Table(c, SWT.CHECK | SWT.BORDER); + GridData gd = new GridData(GridData.FILL_BOTH); gd.horizontalSpan = 2; - mTable.setLayoutData(gd); - mTable.setHeaderVisible(false); - mTable.setLinesVisible(false); + table.setLayoutData(gd); + table.setHeaderVisible(false); + table.setLinesVisible(false); - for (SystraceTag tag : mSupportedTags) { - TableItem item = new TableItem(mTable, SWT.NONE); + for (SystraceTag tag : supportedTags) { + TableItem item = new TableItem(table, SWT.NONE); item.setText(tag.info); item.setChecked(sEnabledTags.contains(tag.tag)); } - TableHelper.createTableColumn(mTable, + TableHelper.createTableColumn(table, "TagHeaderNotDisplayed", //$NON-NLS-1$ SWT.LEFT, "SampleTagForColumnLengthCalculation", //$NON-NLS-1$ null, null); - return c; + return table; } private void validateFields() { @@ -273,14 +297,23 @@ public class SystraceOptionsDialogV2 extends TitleAreaDialog implements ISystrac } sEnabledTags.clear(); - for (int i = 0; i < mTable.getItemCount(); i++) { - TableItem it = mTable.getItem(i); + sEnabledTags.addAll(getEnabledTags(mCommonTagsTable, mCommonSupportedTags)); + sEnabledTags.addAll(getEnabledTags(mAdvancedTagsTable, mAdvancedSupportedTags)); + + super.okPressed(); + } + + private static Set<String> getEnabledTags(Table table, List<SystraceTag> tags) { + Set<String> enabledTags = Sets.newHashSetWithExpectedSize(tags.size()); + + for (int i = 0; i < table.getItemCount(); i++) { + TableItem it = table.getItem(i); if (it.getChecked()) { - sEnabledTags.add(mSupportedTags.get(i).tag); + enabledTags.add(tags.get(i).tag); } } - super.okPressed(); + return enabledTags; } @Override @@ -305,7 +338,7 @@ public class SystraceOptionsDialogV2 extends TitleAreaDialog implements ISystrac @Override public String getOptions() { - StringBuilder sb = new StringBuilder(5 * mSupportedTags.size()); + StringBuilder sb = new StringBuilder(5 * mCommonSupportedTags.size()); if (mTraceApp != null) { sb.append("-a "); //$NON-NLS-1$ diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger.tests/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.gldebugger.tests/META-INF/MANIFEST.MF index 82998ec..55a61dd 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger.tests/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: gldebugger-tests Bundle-SymbolicName: com.android.ide.eclipse.gldebugger.tests -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-RequiredExecutionEnvironment: J2SE-1.5 Require-Bundle: org.junit4;bundle-version="4.5.0";resolution:=optional, com.android.ide.eclipse.gldebugger, diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger.tests/pom.xml b/eclipse/plugins/com.android.ide.eclipse.gldebugger.tests/pom.xml index cbc81f9..6c2d1b4 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger.tests/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger.tests/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.gldebugger.tests</artifactId> <packaging>eclipse-test-plugin</packaging> <name>gldebugger.tests</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.gldebugger/META-INF/MANIFEST.MF index 135f3ff..68f4d28 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Tracer for OpenGL ES Bundle-SymbolicName: com.android.ide.eclipse.gldebugger;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Activator: com.android.ide.eclipse.gltrace.GlTracePlugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/pom.xml b/eclipse/plugins/com.android.ide.eclipse.gldebugger/pom.xml index 83097a1..c8f7a0e 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.gldebugger</artifactId> <packaging>eclipse-plugin</packaging> <name>gldebugger</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java index 2d204eb..c13ab46 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java @@ -224,13 +224,6 @@ public class CollectTraceAction implements IWorkbenchWindowActionDelegate { @SuppressWarnings("resource") // Closeables.closeQuietly public static void startTracing(Shell shell, TraceOptions traceOptions, int port) { - FileOutputStream fos = null; - try { - fos = new FileOutputStream(traceOptions.traceDestination, false); - } catch (FileNotFoundException e) { - // input path is valid, so this cannot occur - } - Socket socket = new Socket(); DataInputStream traceDataStream = null; DataOutputStream traceCommandsStream = null; @@ -243,7 +236,6 @@ public class CollectTraceAction implements IWorkbenchWindowActionDelegate { MessageDialog.openError(shell, "OpenGL Trace", "Unable to connect to remote GL Trace Server: " + e.getMessage()); - Closeables.closeQuietly(fos); return; } @@ -258,10 +250,16 @@ public class CollectTraceAction implements IWorkbenchWindowActionDelegate { "OpenGL Trace", "Unexpected error while setting trace options: " + e.getMessage()); closeSocket(socket); - Closeables.closeQuietly(fos); return; } + FileOutputStream fos = null; + try { + fos = new FileOutputStream(traceOptions.traceDestination, false); + } catch (FileNotFoundException e) { + // input path is valid, so this cannot occur + } + // create trace writer that writes to a trace file TraceFileWriter traceFileWriter = new TraceFileWriter(fos, traceDataStream); traceFileWriter.start(); diff --git a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/META-INF/MANIFEST.MF index 85adb3e..f28447d 100644 --- a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Hierarchy Viewer Bundle-SymbolicName: com.android.ide.eclipse.hierarchyviewer;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Activator: com.android.ide.eclipse.hierarchyviewer.HierarchyViewerPlugin Bundle-Vendor: The Android Open Source Project Bundle-Localization: plugin diff --git a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/pom.xml b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/pom.xml index 7ad6960..c37dc56 100644 --- a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.hierarchyviewer</artifactId> <packaging>eclipse-plugin</packaging> <name>hierarchyviewer</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/views/PixelPerfectLoupeView.java b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/views/PixelPerfectLoupeView.java index bc45ff8..93ad598 100644 --- a/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/views/PixelPerfectLoupeView.java +++ b/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/src/com/android/ide/eclipse/hierarchyviewer/views/PixelPerfectLoupeView.java @@ -82,9 +82,11 @@ public class PixelPerfectLoupeView extends ViewPart implements IImageChangeListe new PixelPerfectPixelPanel(pixelPerfectLoupeBorder); pixelPerfectPixelPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - PixelPerfectControls pixelPerfectControls = - new PixelPerfectControls(parent); - pixelPerfectControls.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + // https://code.google.com/p/android/issues/detail?id=69199 + // Disabled until accessibility issues are fixed + // PixelPerfectControls pixelPerfectControls = + // new PixelPerfectControls(parent); + // pixelPerfectControls.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); placeActions(); } diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF index 7d23f80..8bf0e01 100644 --- a/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.android.ide.eclipse.monitor;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Activator: com.android.ide.eclipse.monitor.MonitorPlugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.properties b/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.properties index 3aeff27..5b80fcf 100644 --- a/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.properties +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/plugin.properties @@ -4,5 +4,5 @@ Bundle-Vendor = The Android Open Source Project Bundle-Name = Monitor aboutText = \n\ Android Device Monitor\n\ -Version: 23.0.4 \n\ +Version: 24.0.2 \n\ Copyright 2012, The Android Open Source Project \n\ diff --git a/eclipse/plugins/com.android.ide.eclipse.monitor/pom.xml b/eclipse/plugins/com.android.ide.eclipse.monitor/pom.xml index 56db7e5..0ec7d9b 100644 --- a/eclipse/plugins/com.android.ide.eclipse.monitor/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.monitor/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.monitor</artifactId> <packaging>eclipse-plugin</packaging> <name>monitor</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.ndk/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.ndk/META-INF/MANIFEST.MF index 6823b78..7f60dd2 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ndk/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.ndk/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: ADT CDT Integration Bundle-SymbolicName: com.android.ide.eclipse.ndk;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Activator: com.android.ide.eclipse.ndk.internal.Activator Bundle-Vendor: The Android Open Source Project Require-Bundle: org.eclipse.core.runtime, diff --git a/eclipse/plugins/com.android.ide.eclipse.ndk/pom.xml b/eclipse/plugins/com.android.ide.eclipse.ndk/pom.xml index ec0594e..e78f628 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ndk/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.ndk/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.ndk</artifactId> <packaging>eclipse-plugin</packaging> <name>ndk</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.pdt/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.pdt/META-INF/MANIFEST.MF index 8eb0de0..6c9c4af 100644 --- a/eclipse/plugins/com.android.ide.eclipse.pdt/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.pdt/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Pdt Bundle-SymbolicName: com.android.ide.eclipse.pdt;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Vendor: The Android Open Source Project Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/.classpath b/eclipse/plugins/com.android.ide.eclipse.tests/.classpath index 83bfa23..f760174 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/.classpath +++ b/eclipse/plugins/com.android.ide.eclipse.tests/.classpath @@ -17,8 +17,8 @@ <classpathentry kind="lib" path="/plugin-adt/libs/lint-checks.jar" sourcepath="/lint-checks"/> <classpathentry kind="lib" path="/plugin-base/libs/sdk-common.jar"/> <classpathentry kind="lib" path="/plugin-adt/libs/lombok-ast-0.2.2.jar"/> - <classpathentry kind="lib" path="/plugin-adt/libs/asm-4.0.jar"/> - <classpathentry kind="lib" path="/plugin-adt/libs/asm-analysis-4.0.jar"/> - <classpathentry kind="lib" path="/plugin-adt/libs/asm-tree-4.0.jar"/> + <classpathentry kind="lib" path="/plugin-adt/libs/asm-5.0.3.jar"/> + <classpathentry kind="lib" path="/plugin-adt/libs/asm-analysis-5.0.3.jar"/> + <classpathentry kind="lib" path="/plugin-adt/libs/asm-tree-5.0.3.jar"/> <classpathentry kind="lib" path="/plugin-adt/libs/manifest-merger.jar" sourcepath="/manifest-merger"/> </classpath> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.tests/META-INF/MANIFEST.MF index b4741aa..37dbc78 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Android Plugin Tests Bundle-SymbolicName: com.android.ide.eclipse.tests -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Vendor: The Android Open Source Project Fragment-Host: com.android.ide.eclipse.adt;bundle-version="21.0.0" Require-Bundle: org.junit @@ -13,3 +13,4 @@ Bundle-ClassPath: ., libs/lint-api.jar, libs/lint-checks.jar, libs/easymock.jar +Import-Package: com.android.tools.lint.detector.api diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/pom.xml b/eclipse/plugins/com.android.ide.eclipse.tests/pom.xml index 39062e4..ed90b3b 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.tests/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.tests</artifactId> <packaging>eclipse-test-plugin</packaging> <name>tests</name> diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/lint/ProjectLintConfigurationTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/lint/ProjectLintConfigurationTest.java index 7fd042e..f8ea8c4 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/lint/ProjectLintConfigurationTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/lint/ProjectLintConfigurationTest.java @@ -29,6 +29,7 @@ import com.android.tools.lint.detector.api.Issue; import com.android.tools.lint.detector.api.Location; import com.android.tools.lint.detector.api.Project; import com.android.tools.lint.detector.api.Severity; +import com.android.tools.lint.detector.api.TextFormat; import org.eclipse.core.resources.IProject; @@ -191,7 +192,7 @@ public class ProjectLintConfigurationTest extends AdtProjectTest { @Override public void report(@NonNull Context context, @NonNull Issue issue, @NonNull Severity severity, @Nullable Location location, - @NonNull String message, @Nullable Object data) { + @NonNull String message, @NonNull TextFormat format) { } @Override diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/wizards/templates/TemplateHandlerTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/wizards/templates/TemplateHandlerTest.java index 09f4592..9d3bc60 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/wizards/templates/TemplateHandlerTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/wizards/templates/TemplateHandlerTest.java @@ -35,7 +35,6 @@ import com.android.sdklib.IAndroidTarget; import com.android.utils.GrabProcessOutput; import com.android.utils.GrabProcessOutput.IProcessOutput; import com.android.utils.GrabProcessOutput.Wait; -import com.android.tools.lint.checks.BuiltinIssueRegistry; import com.android.tools.lint.checks.ManifestDetector; import com.android.tools.lint.checks.SecurityDetector; import com.android.tools.lint.client.api.Configuration; @@ -51,6 +50,7 @@ import com.android.tools.lint.detector.api.Location; import com.android.tools.lint.detector.api.Project; import com.android.tools.lint.detector.api.Scope; import com.android.tools.lint.detector.api.Severity; +import com.android.tools.lint.detector.api.TextFormat; import com.google.common.base.Charsets; import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; @@ -155,7 +155,7 @@ public class TemplateHandlerTest extends SdkLoadingTestCase { } public void testNewBlankProject() throws Exception { - Stopwatch stopwatch = new Stopwatch(); + Stopwatch stopwatch = Stopwatch.createUnstarted(); stopwatch.start(); checkProjectWithActivity(null); stopwatch.stop(); @@ -267,7 +267,7 @@ public class TemplateHandlerTest extends SdkLoadingTestCase { // ---- Test support code below ---- private void checkCreateActivityInProject(String activityName) throws Exception { - Stopwatch stopwatch = new Stopwatch(); + Stopwatch stopwatch = Stopwatch.createUnstarted(); stopwatch.start(); File templateFile = findTemplate("activities", activityName); sProjectTestedSeparately.add(templateFile); @@ -278,7 +278,7 @@ public class TemplateHandlerTest extends SdkLoadingTestCase { } private void checkCreateTemplate(String category, String name) throws Exception { - Stopwatch stopwatch = new Stopwatch(); + Stopwatch stopwatch = Stopwatch.createUnstarted(); stopwatch.start(); File templateFile = findTemplate(category, name); assertNotNull(templateFile); @@ -762,11 +762,11 @@ public class TemplateHandlerTest extends SdkLoadingTestCase { System.setProperty("com.android.tools.lint.bindir", AdtPrefs.getPrefs().getOsSdkFolder() + File.separator + FD_TOOLS); - LintDriver driver = new LintDriver(new BuiltinIssueRegistry(), new LintClient() { + LintDriver driver = new LintDriver(EclipseLintClient.getRegistry(), new LintClient() { @Override public void report(@NonNull Context context, @NonNull Issue issue, @NonNull Severity severity, - @Nullable Location location, @NonNull String message, @Nullable Object data) { + @Nullable Location location, @NonNull String message, @NonNull TextFormat format) { String s = "Found lint error: " + issue.getId() + ": " + message + " at " + location; job.setProperty(ERROR_KEY, s); fail(s); diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationTest.java index 2e02509..5b07d7b 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationTest.java @@ -15,18 +15,19 @@ */ package com.android.ide.eclipse.adt.internal.editors.layout.configuration; -import static com.android.ide.common.resources.configuration.LanguageQualifier.FAKE_LANG_VALUE; -import static com.android.ide.common.resources.configuration.RegionQualifier.FAKE_REGION_VALUE; +import static com.android.ide.common.resources.configuration.LocaleQualifier.FAKE_VALUE; import com.android.ide.common.resources.configuration.FolderConfiguration; -import com.android.ide.common.resources.configuration.LanguageQualifier; +import com.android.ide.common.resources.configuration.LocaleQualifier; import com.android.resources.Density; import com.android.sdklib.devices.Device; import com.android.sdklib.devices.DeviceManager; import com.android.sdklib.devices.Screen; import com.android.utils.StdLogger; +import com.google.common.collect.Lists; import java.lang.reflect.Constructor; +import java.util.Collection; import java.util.EnumSet; import java.util.List; @@ -53,25 +54,25 @@ public class ConfigurationTest extends TestCase { DeviceManager deviceManager = DeviceManager.createInstance( null /*osSdkPath*/, new StdLogger(StdLogger.Level.VERBOSE)); - List<Device> devices = deviceManager.getDevices(DeviceManager.DeviceFilter.DEFAULT); + Collection<Device> devices = deviceManager.getDevices(DeviceManager.DeviceFilter.DEFAULT); assertNotNull(devices); assertTrue(devices.size() > 0); - configuration.setDevice(devices.get(0), false); + configuration.setDevice(devices.iterator().next(), false); // Check syncing FolderConfiguration folderConfig = configuration.getFullConfig(); - assertEquals(FAKE_LANG_VALUE, folderConfig.getLanguageQualifier().getValue()); - assertEquals(FAKE_REGION_VALUE, folderConfig.getRegionQualifier().getValue()); + assertEquals(FAKE_VALUE, folderConfig.getLocaleQualifier().getLanguage()); + assertEquals(FAKE_VALUE, folderConfig.getLocaleQualifier().getRegion()); assertEquals(Locale.ANY, configuration.getLocale()); - Locale language = Locale.create(new LanguageQualifier("nb")); + Locale language = Locale.create(new LocaleQualifier("nb")); configuration.setLocale(language, true /* skipSync */); - assertEquals(FAKE_LANG_VALUE, folderConfig.getLanguageQualifier().getValue()); - assertEquals(FAKE_REGION_VALUE, folderConfig.getRegionQualifier().getValue()); + assertEquals(FAKE_VALUE, folderConfig.getLocaleQualifier().getLanguage()); + assertEquals(FAKE_VALUE, folderConfig.getLocaleQualifier().getRegion()); configuration.setLocale(language, false /* skipSync */); - assertEquals(FAKE_REGION_VALUE, folderConfig.getRegionQualifier().getValue()); - assertEquals("nb", folderConfig.getLanguageQualifier().getValue()); + assertEquals(FAKE_VALUE, folderConfig.getLocaleQualifier().getRegion()); + assertEquals("nb", folderConfig.getLocaleQualifier().getLanguage()); assertEquals("2.7in QVGA::nb-__:+Theme::notnight::", configuration.toPersistentString()); @@ -113,13 +114,13 @@ public class ConfigurationTest extends TestCase { DeviceManager deviceManager = DeviceManager.createInstance( null /*osSdkPath*/, new StdLogger(StdLogger.Level.VERBOSE)); - List<Device> devices = deviceManager.getDevices(DeviceManager.DeviceFilter.DEFAULT); + List<Device> devices = Lists.newArrayList(deviceManager.getDevices(DeviceManager.DeviceFilter.DEFAULT)); assertNotNull(devices); assertTrue(devices.size() > 0); configuration.setDevice(devices.get(0), false); configuration.setActivity("foo.bar.FooActivity"); configuration.setTheme("@android:style/Theme.Holo.Light"); - Locale locale = Locale.create(new LanguageQualifier("nb")); + Locale locale = Locale.create(new LocaleQualifier("nb")); configuration.setLocale(locale, false /* skipSync */); Configuration copy = Configuration.copy(configuration); @@ -133,7 +134,7 @@ public class ConfigurationTest extends TestCase { configuration.setTheme("@android:style/Theme.Holo"); configuration.setDevice(devices.get(1), true); - assertTrue(copy.getFullConfig().getLanguageQualifier().equals(locale.language)); + assertTrue(copy.getFullConfig().getLocaleQualifier().equals(locale.qualifier)); assertEquals(locale, copy.getLocale()); assertEquals("foo.bar.FooActivity", copy.getActivity()); assertEquals("@android:style/Theme.Holo.Light", copy.getTheme()); diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/FlagManagerTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/FlagManagerTest.java index c22609f..4286aaa 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/FlagManagerTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/FlagManagerTest.java @@ -16,7 +16,12 @@ package com.android.ide.eclipse.adt.internal.editors.layout.configuration; +import com.android.SdkConstants; import com.android.ide.common.resources.LocaleManager; +import com.google.common.base.Function; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.Multimap; +import com.google.common.collect.Sets; import org.eclipse.swt.graphics.Image; @@ -72,103 +77,109 @@ public class FlagManagerTest extends TestCase { assertSame(ca, manager.getFlagForFolderName("values-en")); } - public void testAvailableIcons() { - // Icons we have in WindowBuilder + public void testAvailableImages() { + // Images we have from WindowBuilder (which are really the famfamfam + // icons; + // see http://www.famfamfam.com/lab/icons/flags) String[] icons = new String[] { "ad", "ae", "af", "ag", "ai", "al", "am", "ao", "ar", "as", "at", "au", "aw", "ax", "az", "ba", "bb", "bd", "be", "bf", "bg", "bh", "bi", "bj", "bm", "bn", "bo", "br", - "bs", "bt", "bv", "bw", "by", "bz", "ca", "cc", "cd", "cf", "cg", "ch", "ci", "ck", - "cl", "cm", "cn", "co", "cr", "cu", "cv", "cx", "cy", "cz", "de", "dj", "dk", "dm", - "do", "dz", "ec", "ee", "eg", "eh", "er", "es", "et", "fi", "fj", "fk", "fm", "fo", - "fr", "ga", "gb", "gd", "ge", "gf", "gh", "gi", "gl", "gm", "gn", "gp", "gq", "gr", - "gs", "gt", "gu", "gw", "gy", "hk", "hm", "hn", "hr", "ht", "hu", "id", "ie", "il", - "in", "io", "iq", "ir", "is", "it", "jm", "jo", "jp", "ke", "kg", "kh", "ki", "km", - "kn", "kp", "kr", "kw", "ky", "kz", "la", "lb", "lc", "li", "lk", "lr", "ls", "lt", - "lu", "lv", "ly", "ma", "mc", "md", "me", "mg", "mh", "mk", "ml", "mm", "mn", "mo", - "mp", "mq", "mr", "ms", "mt", "mu", "mv", "mw", "mx", "my", "mz", "na", "nc", "ne", - "nf", "ng", "ni", "nl", "no", "np", "nr", "nu", "nz", "om", "pa", "pe", "pf", "pg", - "ph", "pk", "pl", "pm", "pn", "pr", "ps", "pt", "pw", "py", "qa", "re", "ro", "rs", - "ru", "rw", "sa", "sb", "sc", "sd", "se", "sg", "sh", "si", "sj", "sk", "sl", "sm", - "sn", "so", "sr", "st", "sv", "sy", "sz", "tc", "td", "tf", "tg", "th", "tj", "tk", - "tl", "tm", "tn", "to", "tr", "tt", "tv", "tw", "tz", "ua", "ug", "um", "us", "uy", - "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu", "wf", "ws", "ye", "yt", "za", "zm", - "zw", + "bs", "bt", "bv", "bw", "by", "bz", "ca", "catalonia", "cc", "cd", "cf", "cg", + "ch", "ci", "ck", "cl", "cm", "cn", "co", "cr", "cu", "cv", "cx", "cy", "cz", "de", + "dj", "dk", "dm", "do", "dz", "ec", "ee", "eg", "eh", "england", "er", "es", "et", + "fi", "fj", "fk", "fm", "fo", "fr", "ga", "gb", "gd", "ge", "gf", "gg", "gh", "gi", + "gl", "gm", "gn", "gp", "gq", "gr", "gs", "gt", "gu", "gw", "gy", "hk", "hm", "hn", + "hr", "ht", "hu", "id", "ie", "il", "im", "in", "io", "iq", "ir", "is", "it", "jm", + "jo", "jp", "ke", "kg", "kh", "ki", "km", "kn", "kp", "kr", "kw", "ky", "kz", "la", + "lb", "lc", "li", "lk", "lr", "ls", "lt", "lu", "lv", "ly", "ma", "mc", "md", "me", + "mg", "mh", "mk", "ml", "mm", "mn", "mo", "mp", "mq", "mr", "ms", "mt", "mu", "mv", + "mw", "mx", "my", "mz", "na", "nc", "ne", "nf", "ng", "ni", "nl", "no", "np", "nr", + "nu", "nz", "om", "pa", "pe", "pf", "pg", "ph", "pk", "pl", "pm", "pn", "pr", "ps", + "pt", "pw", "py", "qa", "re", "ro", "rs", "ru", "rw", "sa", "sb", "sc", "scotland", + "sd", "se", "sg", "sh", "si", "sj", "sk", "sl", "sm", "sn", "so", "sr", "ss", "st", + "sv", "sy", "sz", "tc", "td", "tf", "tg", "th", "tj", "tk", "tl", "tm", "tn", "to", + "tr", "tt", "tv", "tw", "tz", "ua", "ug", "um", "us", "uy", "uz", "va", "vc", "ve", + "vg", "vi", "vn", "vu", "wales", "wf", "ws", "ye", "yt", "za", "zm", "zw" }; - Set<String> sIcons = new HashSet<String>(100); - Map<String, String> regionNames = LocaleManager.getRegionNamesMap(); - Map<String, String> languageToCountry = LocaleManager.getLanguageToCountryMap(); - Map<String, String> languageNames = LocaleManager.getLanguageNamesMap(); - List<String> unused = new ArrayList<String>(); + + Set<String> sImages = new HashSet<String>(100); for (String code : icons) { + if (code.length() > 2) { + continue; + } code = code.toUpperCase(Locale.US); - sIcons.add(code); + sImages.add(code); - String country = regionNames.get(code); - if (country == null) { + if (!LocaleManager.isValidRegionCode(code)) { System.out.println("No region name found for region code " + code); } + } - if (!languageToCountry.values().contains(code)) { - unused.add(code.toLowerCase() + ".png"); + Set<String> unused = Sets.newHashSet(LocaleManager.getRegionCodes(false)); + Set<String> reachable = Sets.newHashSet(); + Multimap<String, String> regionToLanguages = ArrayListMultimap.create(); + for (String language : LocaleManager.getLanguageCodes(false)) { + for (String region : LocaleManager.getRelevantRegions(language)) { + reachable.add(region); + regionToLanguages.put(region, language); } } - if (!unused.isEmpty()) { - System.out.println("The following icons are not referenced by any of the " + - "language to country bindings: " + unused); + unused.removeAll(reachable); + + for (String region : reachable) { + if (!sImages.contains(region)) { + StringBuilder sb = new StringBuilder(); + + sb.append("No icon found for region ").append(region).append(" ") + .append(LocaleManager.getRegionName(region)); + sb.append(", used for languages "); + + for (String language : regionToLanguages.get(region)) { + sb.append(language).append("(").append(LocaleManager.getLanguageName(language)) + .append(") "); + } + System.out.println(sb.toString()); + } } - // Make sure all our language bindings are languages we have maps for - for (Map.Entry<String, String> entry : languageToCountry.entrySet()) { - String language = entry.getKey(); - String region = entry.getValue(); + // Known regions that we don't have language to region mappings for + unused.remove("AQ"); + unused.remove("VA"); + unused.remove("GS"); + unused.remove("TF"); + unused.remove("BV"); + unused.remove("HM"); - if (!sIcons.contains(region)) { - System.out.println("No icon found for region " + region + " " - + LocaleManager.getRegionName(region) + " (used for language " - + language + "(" + languageNames.get(language) + "))"); + if (!unused.isEmpty()) { + StringBuilder sb = new StringBuilder(); + sb.append("The following icons are not referenced by any of the " + + "language to country bindings:"); + for (String code : unused) { + sb.append(code.toLowerCase(Locale.US)).append(SdkConstants.DOT_PNG).append(" ("); + sb.append(LocaleManager.getRegionName(code)).append(") "); } + System.out.println(sb.toString()); } } - /* Utility useful for identifying strings which must be using \\u in the string names - * to ensure that they are handled properly during the build (outside of Eclipse, - * where this source file is marked as using UTF-8. - public void testPrintable() { - Set<String> languageCodes = LocaleManager.getLanguageCodes(); - for (String code : languageCodes) { - String name = LocaleManager.getLanguageName(code); - assertNotNull(name); - checkEncoding(name); - } + public void testMissingFlag() { + Image icon = FlagManager.get().getFlag("AQ"); + assertNotNull(icon); + assertSame(FlagManager.get().getEmptyIcon(), icon); - Set<String> regionCodes = LocaleManager.getRegionCodes(); - for (String code : regionCodes) { - String name = LocaleManager.getRegionName(code); - assertNotNull(name); - checkEncoding(name); - } + icon = FlagManager.get().getFlag("AQ"); + assertNotNull(icon); + assertSame(FlagManager.get().getEmptyIcon(), icon); + + icon = FlagManager.get().getFlag("WO"); // Not used in ISO 3166-1 + assertNotNull(icon); + assertSame(FlagManager.get().getEmptyIcon(), icon); } - private static void checkEncoding(String s) { - for (int i = 0, n = s.length(); i < n; i++) { - char c = s.charAt(i); - if (c >= 128) { - System.out.println("Need unicode encoding for '" + s + "'"); - StringBuilder sb = new StringBuilder(); - for (int j = 0, m = s.length(); j < m; j++) { - char d = s.charAt(j); - if (d < 128) { - sb.append(d); - } else { - sb.append('\\'); - sb.append('u'); - sb.append(String.format("%04x", (int)d)); - } - } - System.out.println(" Replacement=" + sb); - return; - } - } + public void testKnownFlag() { + Image icon = FlagManager.get().getFlag("US"); + assertNotNull(icon); + assertNotSame(FlagManager.get().getEmptyIcon(), icon); } - */ } + diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/LocaleTest.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/LocaleTest.java index 3dcf33a..904ade3 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/LocaleTest.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/configuration/LocaleTest.java @@ -13,44 +13,87 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.android.ide.eclipse.adt.internal.editors.layout.configuration; -import com.android.ide.common.resources.configuration.LanguageQualifier; -import com.android.ide.common.resources.configuration.RegionQualifier; +import com.android.ide.common.resources.configuration.FolderConfiguration; +import com.android.ide.common.resources.configuration.LocaleQualifier; import junit.framework.TestCase; @SuppressWarnings("javadoc") public class LocaleTest extends TestCase { + public void test1() { + Locale locale = Locale.create("en-rUS"); + assertEquals("en", locale.qualifier.getLanguage()); + assertEquals("US", locale.qualifier.getRegion()); + assertTrue(locale.hasLanguage()); + assertTrue(locale.hasRegion()); + } + + public void test2() { + Locale locale = Locale.create("zh"); + assertEquals("zh", locale.qualifier.getLanguage()); + assertNull(locale.qualifier.getRegion()); + assertTrue(locale.hasLanguage()); + assertFalse(locale.hasRegion()); + } + + public void testEquals() { + Locale locale = Locale.create("zh"); + assertEquals("zh", locale.qualifier.getLanguage()); + assertNull(locale.qualifier.getRegion()); + assertTrue(locale.hasLanguage()); + assertFalse(locale.hasRegion()); + } + public void test() { - LanguageQualifier language1 = new LanguageQualifier("nb"); - LanguageQualifier language2 = new LanguageQualifier("no"); - RegionQualifier region1 = new RegionQualifier("NO"); - RegionQualifier region2 = new RegionQualifier("SE"); + LocaleQualifier qualifier1 = LocaleQualifier.getQualifier("nb"); + LocaleQualifier qualifier2 = LocaleQualifier.getQualifier("no"); + LocaleQualifier qualifier3 = LocaleQualifier.getQualifier("nb-rNO"); + LocaleQualifier qualifier4 = LocaleQualifier.getQualifier("nb-rSE"); + LocaleQualifier qualifier5 = LocaleQualifier.getQualifier("no-rSE"); + assertNotNull(qualifier1); + assertNotNull(qualifier2); + assertNotNull(qualifier3); + assertNotNull(qualifier4); + assertNotNull(qualifier5); assertEquals(Locale.ANY, Locale.ANY); assertFalse(Locale.ANY.hasLanguage()); assertFalse(Locale.ANY.hasRegion()); - assertFalse(Locale.create(new LanguageQualifier(LanguageQualifier.FAKE_LANG_VALUE), - new RegionQualifier(RegionQualifier.FAKE_REGION_VALUE)).hasLanguage()); - assertFalse(Locale.create(new LanguageQualifier(LanguageQualifier.FAKE_LANG_VALUE), - new RegionQualifier(RegionQualifier.FAKE_REGION_VALUE)).hasRegion()); - - assertEquals(Locale.create(language1), Locale.create(language1)); - assertTrue(Locale.create(language1).hasLanguage()); - assertFalse(Locale.create(language1).hasRegion()); - assertTrue(Locale.create(language1, region1).hasLanguage()); - assertTrue(Locale.create(language1, region1).hasRegion()); - - assertEquals(Locale.create(language1, region1), Locale.create(language1, region1)); - assertEquals(Locale.create(language1), Locale.create(language1)); - assertTrue(Locale.create(language1).equals(Locale.create(language1))); - assertTrue(Locale.create(language1, region1).equals(Locale.create(language1, region1))); - assertFalse(Locale.create(language1, region1).equals(Locale.create(language1, region2))); - assertFalse(Locale.create(language1).equals(Locale.create(language1, region1))); - assertFalse(Locale.create(language1).equals(Locale.create(language2))); - assertFalse(Locale.create(language1, region1).equals(Locale.create(language2, region1))); - assertEquals("Locale{nb, __}", Locale.create(language1).toString()); - assertEquals("Locale{nb, NO}", Locale.create(language1, region1).toString()); + // noinspection ConstantConditions + assertFalse(Locale.create(new LocaleQualifier(LocaleQualifier.FAKE_VALUE)).hasLanguage()); + // noinspection ConstantConditions + assertFalse(Locale.create(new LocaleQualifier(LocaleQualifier.FAKE_VALUE)).hasRegion()); + + assertEquals(Locale.create(qualifier1), Locale.create(qualifier1)); + assertTrue(Locale.create(qualifier1).hasLanguage()); + assertFalse(Locale.create(qualifier1).hasRegion()); + assertTrue(Locale.create(qualifier3).hasLanguage()); + assertTrue(Locale.create(qualifier3).hasRegion()); + + assertEquals(Locale.create(qualifier3), Locale.create(qualifier3)); + assertEquals(Locale.create(qualifier1), Locale.create(qualifier1)); + assertTrue(Locale.create(qualifier1).equals(Locale.create(qualifier1))); + assertTrue(Locale.create(qualifier3).equals(Locale.create(qualifier3))); + assertFalse(Locale.create(qualifier3).equals(Locale.create(qualifier4))); + assertFalse(Locale.create(qualifier1).equals(Locale.create(qualifier3))); + assertFalse(Locale.create(qualifier1).equals(Locale.create(qualifier2))); + assertFalse(Locale.create(qualifier3).equals(Locale.create(qualifier5))); + assertEquals("nb", Locale.create(qualifier1).toString()); + assertEquals("nb-NO", Locale.create(qualifier3).toString()); + + assertEquals(Locale.create(qualifier1), Locale.create("b+nb")); + assertEquals(Locale.create(qualifier3), Locale.create("b+nb+NO")); + } + + public void testFolderConfig() { + FolderConfiguration config = new FolderConfiguration(); + assertEquals(Locale.ANY, Locale.create(config)); + config.setLocaleQualifier(LocaleQualifier.getQualifier("en")); + assertEquals(Locale.create("en"), Locale.create(config)); + config.setLocaleQualifier(LocaleQualifier.getQualifier("en-rUS")); + assertEquals(Locale.create("en-rUS"), Locale.create(config)); } } diff --git a/eclipse/plugins/com.android.ide.eclipse.traceview/META-INF/MANIFEST.MF b/eclipse/plugins/com.android.ide.eclipse.traceview/META-INF/MANIFEST.MF index 0ea9ec4..2a47a90 100644 --- a/eclipse/plugins/com.android.ide.eclipse.traceview/META-INF/MANIFEST.MF +++ b/eclipse/plugins/com.android.ide.eclipse.traceview/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Traceview Bundle-SymbolicName: com.android.ide.eclipse.traceview;singleton:=true -Bundle-Version: 23.0.4.qualifier +Bundle-Version: 24.0.2.qualifier Bundle-Activator: com.android.ide.eclipse.traceview.TraceviewPlugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, diff --git a/eclipse/plugins/com.android.ide.eclipse.traceview/pom.xml b/eclipse/plugins/com.android.ide.eclipse.traceview/pom.xml index 5131a5b..c911b83 100644 --- a/eclipse/plugins/com.android.ide.eclipse.traceview/pom.xml +++ b/eclipse/plugins/com.android.ide.eclipse.traceview/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> - <version>23.0.4-SNAPSHOT</version> + <version>24.0.2-SNAPSHOT</version> <artifactId>com.android.ide.eclipse.traceview</artifactId> <packaging>eclipse-plugin</packaging> <name>traceview</name> diff --git a/eclipse/pom.xml b/eclipse/pom.xml index 4001d44..025fc98 100644 --- a/eclipse/pom.xml +++ b/eclipse/pom.xml @@ -192,5 +192,25 @@ </configuration> </plugin> </plugins> + <!-- + Don't include META-INF/maven in the jar files, this causes an unnecessary increase in the + path length as that folder contained the files with the longest paths (one path was 190 chars). + Windows has a limit of ~260 chars, but removing all the maven info lowers our max path length + from 190 to about 150. + --> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.eclipse.tycho</groupId> + <artifactId>tycho-packaging-plugin</artifactId> + <version>${tycho-version}</version> + <configuration> + <archive> + <addMavenDescriptor>false</addMavenDescriptor> + </archive> + </configuration> + </plugin> + </plugins> + </pluginManagement> </build> </project> diff --git a/eclipse/scripts/build.xml b/eclipse/scripts/build.xml deleted file mode 100644 index 67861bc..0000000 --- a/eclipse/scripts/build.xml +++ /dev/null @@ -1,133 +0,0 @@ -<!-- - * Copyright (C) 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - -*Sample* build.xml for ADT plugin build. Do not use for actual releases. - -Note: this uses the target platform from eclipse-build-deps. -All these are newer than Eclipse 3.6.2 which is our current baseline. - -Note: for actual releases, use build_server.sh instead of this. - -To build: -$ cd sdk/eclipse/scripts -$ ant -This should create the plugins in $OUT/host/eclipse/adtplugins/build/v<timestamp>-aosp - ---> -<project name="com.android.eclipse.rcp.build" default="build"> - <!-- The timestamp for the context qualifier. --> - <tstamp> - <format property="adt.timestamp" - pattern="yyyyMMddHHmmss" /> - </tstamp> - - <!-- Root of Android Source Tree --> - <property name="ANDROID_SRC" location="../../../" /> - - <!-- Host Eclipse used for building the RCP --> - <property name="basebuilder" value="${ANDROID_SRC}/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/" /> - - <!-- Source for target prebuilts --> - <property name="targetSrcDir1" value="${ANDROID_SRC}/prebuilts/eclipse/" /> - <property name="targetSrcDir2" value="${ANDROID_SRC}/prebuilts/eclipse-build-deps/" /> - - <!-- Location where build happens and resulting binaries are generated --> - <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/adtplugins/" /> - - <!-- Location where the target platform is created --> - <property name="targetDir" value="${outDir}/target" /> - - <!-- Location where the target platform is created --> - <property name="buildDir" value="${outDir}/build" /> - - <!-- Location of the sources --> - <property name="srcDir" value="${ANDROID_SRC}/sdk/eclipse/" /> - - <!-- locate launcher plugin inside eclipse --> - <path id="equinox.launcher.path"> - <fileset dir="${basebuilder}/plugins"> - <include name="org.eclipse.equinox.launcher_*.jar" /> - </fileset> - </path> - <property name="equinox.launcher" refid="equinox.launcher.path" /> - - <!-- locate pde build plugin inside eclipse --> - <path id="pde.build.dir.path"> - <dirset dir="${basebuilder}/plugins"> - <include name="org.eclipse.pde.build_*" /> - </dirset> - </path> - <property name="pde.build.dir" refid="pde.build.dir.path" /> - - <!-- create the build directory, copy plugins and features into it --> - <target name="copy_srcs"> - <mkdir dir="${buildDir}" /> - <copy todir="${buildDir}" preservelastmodified="true"> - <fileset dir="${srcDir}/"> - <include name="plugins/**" /> - <include name="features/**" /> - <exclude name="plugins/*/bin/**" /> - </fileset> - </copy> - </target> - - <!-- create target platform --> - <target name="create-target"> - <mkdir dir="${targetDir}" /> - <mkdir dir="${targetDir}/deltapack" /> - <mkdir dir="${targetDir}/repos" /> - - <unzip src="${targetSrcDir1}/deltapack/eclipse-3.7.2-delta-pack.zip" dest="${targetDir}/deltapack" overwrite="false" /> - <unzip src="${targetSrcDir1}/platform/org.eclipse.platform-3.7.2.zip" dest="${targetDir}/repos/platform" overwrite="false" /> - <unzip src="${targetSrcDir2}/cdt/cdt-master-8.0.2.zip" dest="${targetDir}/repos/cdt" overwrite="false" /> - <unzip src="${targetSrcDir2}/emf/emf-xsd-SDK-M201201231045.zip" dest="${targetDir}/repos/emf" overwrite="false" /> - <unzip src="${targetSrcDir2}/jdt/org.eclipse.jdt.source-3.7.2.zip" dest="${targetDir}/repos/jdt" overwrite="false" /> - <unzip src="${targetSrcDir2}/wtp/wtp-repo-R-3.3.2-20120210195245.zip" dest="${targetDir}/repos/wtp" overwrite="false" /> - <unzip src="${targetSrcDir2}/gef/GEF-SDK-3.7.2.zip" dest="${targetDir}/repos/gef" overwrite="false" /> - </target> - - <!-- Launch pde build --> - <target name="pde-build" depends="copy_srcs, create-target"> - <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true"> - <arg value="-application" /> - <arg value="org.eclipse.ant.core.antRunner" /> - <arg value="-buildfile" /> - <arg value="${pde.build.dir}/scripts/build.xml" /> - <arg value="-data" /> - <arg value="${buildDir}/workspace" /> - <arg value="-configuration" /> - <arg value="${buildDir}/configuration" /> - <arg value="-Dbuilder=${srcDir}/buildConfig" /> - <arg value="-Dtimestamp=${timestamp}" /> - <arg value="-DeclipseLocation=${baseBuilder}" /> - <arg value="-DbuildDirectory=${buildDir}" /> - <arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" /> - <arg value="-DrepoBaseLocation=${targetDir}/repos/" /> - <arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" /> - <arg value="-DupdateSiteSource=${srcDir}/sites/external" /> - <arg value="-DforceContextQualifier=v${adt.timestamp}-aosp" /> - <classpath> - <pathelement location="${equinox.launcher}" /> - </classpath> - </java> - </target> - - <target name="clean"> - <delete dir="${outDir}" /> - <delete dir="${targetDir}" /> - </target> - - <target name="build" depends="pde-build" /> -</project> diff --git a/eclipse/scripts/build_ide.sh b/eclipse/scripts/build_ide.sh deleted file mode 100755 index 50125cf..0000000 --- a/eclipse/scripts/build_ide.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Expected arguments: -# $1 = out_dir -# $2 = ide qualifier -# $3 = zip qualifier - -if [[ "Linux" != $(uname) ]]; then - echo "$0: ADT IDE build script runs only on Linux" - exit 0 -fi - -PROG_DIR=$(dirname "$0") - -DEST_DIR="$1" -IDE_QUALIFIER="$2" -ZIP_QUALIFIER="$3" - -function die() { - echo "$*" > /dev/stderr - echo "Usage: $0 dest_dir ide_qualifier zip_qualifier" > /dev/stderr - exit 1 -} - -if [[ -z "$DEST_DIR" ]]; then die "## Error: Missing dest_dir"; fi -if [[ -z "$IDE_QUALIFIER" ]]; then die "## Error: Missing ide qualifier"; fi -if [[ -z "$ZIP_QUALIFIER" ]]; then die "## Error: Missing zip qualifier"; fi - -ADT_IDE_DEST_DIR="$DEST_DIR" \ -ADT_IDE_QUALIFIER="$IDE_QUALIFIER" \ -ADT_IDE_ZIP_QUALIFIER="$ZIP_QUALIFIER" \ - make PRODUCT-sdk-adt_eclipse_ide - diff --git a/eclipse/scripts/build_plugins.sh b/eclipse/scripts/build_plugins.sh deleted file mode 100755 index 34347cf..0000000 --- a/eclipse/scripts/build_plugins.sh +++ /dev/null @@ -1,254 +0,0 @@ -#!/bin/bash - -# build script for eclipse adt build on the Linux and Mac platforms -# -# Usage: sdk/eclipse/scripts/build_plugins <build_version> -# -# It expects environment variable ECLIPSE_HOME to be defined to point to _your_ -# version of Eclipse RCP (must have the WTP & GEF plugins available too.) -# -# If ECLIPSE_HOME is not provided, this script will _download_ a reference version -# of Eclipse RCP and install it in a specific location. -# -# Other properties, ant scripts that drive the build are defined in ./buildConfig -# Currently, this script will create an update site at ${user.home}/www/no_crawl/android-build -# or at the directory specified using "-d" - -# Known Issues: -# - Build does not properly clean up after itself (build server always executes from -# a clean state.) -# - Script will fail if current absolute path has spaces in it. -# - Only linux and OSX are supported for now -# - Do NOT manually invoke this script. Instead use the build_server.sh wrapper -# which does some extra preliminary steps (it builds a few libs needed here.) - - -set -e # abort this script early if any command fails - -# -# -- Utility methods -- -# - -function printUsage() { - echo "Usage: $0 <build_qualifier> [-i] [-d <destination-directory>] [-a <archivePrefix>] " - echo "<build_qualifier>: build qualifier string" - echo "-i = build internal site. Otherwise, external site will be built" - echo "-d = destination directory. Default is $USER/www/no_crawl/. Cannot contain spaces." - echo "-a = archive prefix. Cannot contain spaces." -} - -function die() { - echo $@ - exit 1 -} - -function dieWithUsage() { - echo $@ - echo - printUsage - exit 1 -} - - -# -# -- Setup our custom version of Eclipse -- -# - -# The dependency on the linux platform comes from a series of environment -# variables that the eclipse ant runner expects. These are defined in the -# build.properties file. We can easily support other platforms but would need -# to override those values in this script. -HOST=`uname` -if [ "$HOST" == "Linux" ]; then - BASEOS=linux - BASEWS=gtk - BASEARCH=x86 -elif [ "$HOST" == "Darwin" ]; then - BASEOS=macosx - BASEWS=cocoa - BASEARCH=x86 -else - die "ERROR: This script is currently only supported on Linux and MacOSX." -fi - - -# Make sure this runs from the sdk/eclipse plugin. -D=`dirname "$0"` -cd "$D/.." -[ `basename "$PWD"` == "eclipse" ] || dieWithUsage "Please run this script from the sdk/eclipse directory" - -# check for number of parameters -[ $# -lt 1 ] && dieWithUsage "ERROR: Not enough parameters" - -# check if ECLIPSE_HOME set (ECLIPSE_HOME is were the "eclipse" binary and the -# "plugins" sub-directory are located) -if [ -z "$ECLIPSE_HOME" ]; then - BASE_DIR=/buildbot/eclipse-android - - echo "ECLIPSE_HOME not set, using $BASE_DIR as default" - - if [ ! -d "$BASE_DIR" ]; then - mkdir -p "$BASE_DIR" || die "Please create a directory $BASE_DIR where Eclipse will be installed, i.e. execute 'mkdir -p $BASE_DIR && chown $USER $BASE_DIR'." - fi - - # download the version if not available - VERSION="3.6.2" - BASE_DIR="$BASE_DIR/$VERSION" - scripts/setup_eclipse.sh -p "$BASE_DIR" - - ECLIPSE_HOME="$BASE_DIR/eclipse" # path to installed directory - PID_FILE="$BASE_DIR/eclipse.pid" - [ -f "$PID_FILE" ] && ECLIPSE_PID=`cat "$PID_FILE"` -fi - -echo "PWD=`pwd`" -echo "ECLIPSE_HOME=$ECLIPSE_HOME" - -# -# -- Site parameters and Build version -- -# - -BUILD_VERSION="$1" ; shift - -# parse for build internal site flag. If set, pass in internalSite property to ant scripts -if [ "-i" == "$1" ]; then - shift - echo "Setting for internal site build" - SITE_PARAM="-DinternalSite=1 -DupdateSiteSource=$PWD/sites/internal" -else - SITE_PARAM="-DupdateSiteSource=$PWD/sites/external" -fi - -if [ "-d" == $1 ]; then - shift - echo "Setting destination directory to $1" - SITE_PARAM="$SITE_PARAM -DupdateSiteRoot=$1" - shift -fi - -if [ "-a" == "$1" ]; then - shift - echo "Setting archivePrefix to $1" - SITE_PARAM="$SITE_PARAM -DarchivePrefix=$1" - shift -fi - - -# -# -- Configuration directory -- -# - -# The "configuration directory" will hold the workspace for this build. -# If it contains old data the build may fail so we need to clean it first -# and create it if it doesn't exist. -CONFIG_DIR="../../out/eclipse-configuration-$BUILD_VERSION" -[ -d "$CONFIG_DIR" ] && rm -rfv "$CONFIG_DIR" -mkdir -p "$CONFIG_DIR" - -# The "buildConfig" directory contains our customized ant rules -BUILDCONFIG="$PWD/buildConfig" - - -# -# -- Find Eclipse Launcher -- -# - -# Get the Eclipse launcher and build script to use -function findFirst() { - for i in "$@"; do - if [ -f "$i" ]; then - echo "$i" - return - fi - done -} - -LAUNCHER=`findFirst "$ECLIPSE_HOME"/plugins/org.eclipse.equinox.launcher_*.jar` -BUILDFILE=`findFirst "$ECLIPSE_HOME"/plugins/org.eclipse.pde.build_*/scripts/build.xml` - -# make sure we found valid files -if [ ! -f "$LAUNCHER" ]; then - echo "Installation Error: Eclipse plugin org.eclipse.equinox.launcher...jar not detected. " \ - "Found '$LAUNCHER'. Aborting." - exit 1 -fi -if [ ! -f "$BUILDFILE" ]; then - echo "Installation Error: Eclipse build file org.eclipse.pde.build_.../scripts/build.xml " \ - "not detected. Found '$BUILDFILE'. Aborting." - exit 1 -fi - -# -# Ensure that the src dir exists since it's empty -# -mkdir -p $PWD/plugins/com.android.ide.eclipse.adt.overlay/src - -# -# -- Print configuration used and actually execute the build -- -# - -echo "Eclipse configuration found:" -echo " Eclipse Home: $ECLIPSE_HOME" -echo " Launcher: $LAUNCHER" -echo " Build File: $BUILDFILE" -echo " Build Config: $BUILDCONFIG" -echo " Config Dir: $CONFIG_DIR" -echo " Java: " $(which java) -java -version - -# clean input directories to make sure there's nothing left from previous run - -rm -fv *.properties *.xml -find . -name "@*" | xargs rm -rfv - -# Now execute the ant runner - -set +e # don't stop on errors anymore, we want to catch them here -set -x - -java \ - -jar $LAUNCHER \ - -data "$CONFIG_DIR" \ - -configuration "$CONFIG_DIR" \ - -application org.eclipse.ant.core.antRunner \ - -buildfile $BUILDFILE \ - -Dbuilder=$BUILDCONFIG \ - -DbuildDirectory=$PWD \ - -DforceContextQualifier=$BUILD_VERSION \ - -DECLIPSE_HOME=$ECLIPSE_HOME \ - -Dbaseos=$BASEOS \ - -Dbasews=$BASEWS \ - -Dbasearch=$BASEARCH \ - $SITE_PARAM -RESULT=$? -set +x - -if [ "0" != "$RESULT" ]; then - echo "JAVA died with error code $RESULT" - echo "Dump of build config logs:" - for i in "$CONFIG_DIR"/*.log; do - if [ -f "$i" ]; then - echo "----------------------" - echo "--- $i" - echo "----------------------" - cat "$i" - echo - fi - done -fi - -# -# -- Cleanup -# - -if [ -n "$ECLIPSE_PID" ] && [ -f "$PID_FILE" ]; then - rm -fv "$PID_FILE" - kill -9 "$ECLIPSE_PID" -fi - -# Remove build files left by Eclipse all behind -rm -fv *.properties *.xml -find . -name "@*" | xargs rm -rfv - - -# we're done! diff --git a/eclipse/scripts/build_server.sh b/eclipse/scripts/build_server.sh deleted file mode 100755 index 46947ed..0000000 --- a/eclipse/scripts/build_server.sh +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/bash -# Entry point to build the Eclipse plugins for the build server. -# -# Input parameters: -# $1: *Mandatory* destination directory. Must already exist. Cannot contain spaces. -# $2: Optional build number. If present, will be appended to the date qualifier. -# The build number cannot contain spaces *nor* periods (dashes are ok.) -# -z: Optional, prevents the final zip and leaves the udate-site directory intact. -# -i: Optional, if present, the Google internal update site will be built. Otherwise, -# the external site will be built -# Workflow: -# - make dx, ddms, ping -# - create symlinks (for eclipse code reorg, for ddms, ping) -# - call the actual builder script from Brett -# - zip resulting stuff and move to $DEST -# Note: currently wrap around existing shell script, reuse most of it, -# eventually both might merge as needed. - - -################### -# temporary disable to deal with build server issues -# see b/14685861 -exit 0 -################### - - -set -e # Fail this script as soon as a command fails -- fail early, fail fast - -PROG_DIR=$(dirname "$0") - -DEST_DIR="" -BUILD_NUMBER="" -CREATE_ZIP="1" -INTERNAL_BUILD="" -ADT_PREVIEW="preview" # "preview" for preview builds, "" for final release builds. - -function get_params() { - # parse input parameters - while [ $# -gt 0 ]; do - if [ "$1" == "-z" ]; then - CREATE_ZIP="" - elif [ "$1" == "-i" ]; then - INTERNAL_BUILD="-i" - elif [ "$1" != "" ] && [ -z "$DEST_DIR" ]; then - DEST_DIR="$1" - elif [ "$1" != "" ] && [ -z "$BUILD_NUMBER" ]; then - BUILD_NUMBER="$1" - fi - shift - done -} - -function die() { - echo "Error:" $* - echo "Aborting" - exit 1 -} - -function check_params() { - # This needs to run from the top android directory - # Automatically CD to the top android directory, whatever its name - D="$PROG_DIR" - cd "$D/../../../" && echo "Switched to directory $PWD" - - # The current Eclipse build has some Linux dependency in its config files - [ `uname` == "Linux" -o `uname` == "Darwin" ] || die "This must run from a Linux or Mac OSX box." - - # Check dest dir exists - [ -n "$DEST_DIR" ] || die "Usage: $0 <destination-directory> [build-number]" - [ -d "$DEST_DIR" ] || die "Destination directory $DEST_DIR must exist." - - # Qualifier is "v" followed by date/time in YYYYMMDDHHSS format, an optional "preview" - # tag and the optional build number. - DATE=`date +v%Y%m%d%H%M` - local preview="${ADT_PREVIEW:+-}${ADT_PREVIEW}" - QUALIFIER="${DATE}${preview}" - [ -n "$BUILD_NUMBER" ] && QUALIFIER="${QUALIFIER}-${BUILD_NUMBER}" - - return 0 -} - -function build_plugin() { - sdk/eclipse/scripts/create_all_symlinks.sh - - # Compute the final directory name and remove any leftovers from previous - # runs if any. - BUILD_PREFIX="android-eclipse" - if [ "$INTERNAL_BUILD" ]; then - # append 'eng' qualifier to end of archive name to denote internal build - BUILD_PREFIX="${BUILD_PREFIX}-eng" - fi - - # exclude date from build-zip name so it can be auto-calculated by continuous - # test process unless there's no build number, in which case the date is - # still used (useful for testing) - local preview="${ADT_PREVIEW:+-}${ADT_PREVIEW}" - ZIP_NAME="${BUILD_PREFIX}${preview}-${BUILD_NUMBER:-$DATE}.zip" - [ -d "$DEST_DIR/$BUILD_PREFIX" ] || rm -rfv "$DEST_DIR/$BUILD_PREFIX" - - # Perform the Eclipse build and move the result in $DEST_DIR/android-build - sdk/eclipse/scripts/build_plugins.sh $QUALIFIER $INTERNAL_BUILD -d "$DEST_DIR" -a "$BUILD_PREFIX" - - # Cleanup - [ -d "$QUALIFIER" ] && rm -rfv "$QUALIFIER" - - if [ "$CREATE_ZIP" ]; then - # The result is a full update-site under $DEST_DIR/BUILD_PREFIX - # Zip it and remove the directory. - echo "**** Package in $DEST_DIR" - [ -d "$DEST_DIR/$BUILD_PREFIX" ] || \ - die "Build failed to produce $DEST_DIR/$BUILD_PREFIX" - cd "$DEST_DIR" - [ -f "$ZIP_NAME" ] && rm -rfv "$ZIP_NAME" - cd "$BUILD_PREFIX" - zip -9r "../$ZIP_NAME" * - cd .. # back to $DEST_DIR - rm -rfv "$BUILD_PREFIX" # removes the directory, not the zip - echo "ZIP of Update site available at $DEST_DIR/${ZIP_NAME}" - else - echo "Update site available in $DEST_DIR/$BUILD_PREFIX" - fi -} - -function build_adt_ide() { - local preview="${ADT_PREVIEW}${ADT_PREVIEW:+-}" - if [[ -z $INTERNAL_BUILD ]]; then - # This needs to run from the top android directory - D="$PROG_DIR" - cd "$D/../../../" && echo "Switched to directory $PWD" - - IDE_SCRIPTS="sdk/eclipse/scripts/build_ide.sh tools/idea/build_ide_ext.sh" - for sc in $IDE_SCRIPTS; do - if [[ -x $sc ]]; then - echo "RUNNING $sc from $PWD" - $sc "$DEST_DIR" "$QUALIFIER" "${preview}${BUILD_NUMBER:-$QUALIFIER}" - else - echo "WARNING: skipping non-exec $sc script" - fi - done - fi -} - -get_params "$@" -check_params -( build_plugin ) -( build_adt_ide ) - diff --git a/eclipse/scripts/create_all_symlinks.sh b/eclipse/scripts/create_all_symlinks.sh deleted file mode 100755 index e3cef1a..0000000 --- a/eclipse/scripts/create_all_symlinks.sh +++ /dev/null @@ -1,396 +0,0 @@ -#!/bin/bash -# See usage() below for the description. - -function usage() { - cat <<EOF -# This script copies the .jar files that each plugin depends on into the plugins libs folder. -# By default, on Mac & Linux, this script creates symlinks from the libs folder to the jar file. -# Since Windows does not support symlinks, the jar files are copied. -# -# Options: -# -f : to copy files rather than creating symlinks on the Mac/Linux platforms. -# -d : print make dependencies instead of running make; doesn't copy files. -# -c : copy files expected after make dependencies (reported by -d) have been built. -# -# The purpose of -d/-c is to include the workflow in a make file: -# - the make rule should depend on \$(shell create_all_symlinks -d) -# - the rule body should perform \$(shell create_all_symlinks -c [-f]) -EOF -} - -# CD to the top android directory -PROG_DIR=`dirname "$0"` -cd "${PROG_DIR}/../../../" - -HOST=`uname` -USE_COPY="" # force copy dependent jar files rather than creating symlinks -ONLY_SHOW_DEPS="" # only report make dependencies but don't build them nor copy. -ONLY_COPY_DEPS="" # only copy dependencies built by make; uses -f as needed. - -function die() { - echo "Error: $*" >/dev/stderr - exit 1 -} - -function warn() { - # Only print something if not in show-deps mode - if [[ -z $ONLY_SHOW_DEPS ]]; then - echo "$*" - fi -} - -function printGradleJarPath() { - # Prints to stdout the absolute path of the JAR assembled for a given gradle project. - # $1 = source dir, e.g. tools/base or tools/swt - # $2 = the gradle project name e.g. common or lint-api - echo "## Quering Gradle properties for '$2' in '$1'." > /dev/stderr - ( cd $1 && \ - ./gradlew :$2:properties | awk ' - BEGIN { B=""; N=""; V="" } - /^archivesBaseName:/ { N=$2 } - /^buildDir:/ { D=$2 } - /^version:/ { V=$2 } - END { print D "/libs/" N "-" V ".jar" }' ) -} - -## parse arguments -while [ $# -gt 0 ]; do - case "$1" in - "-f" ) - USE_COPY="1" - ;; - "-d" ) - ONLY_SHOW_DEPS="1" - ;; - "-c" ) - ONLY_COPY_DEPS="1" - ;; - * ) - usage - exit 2 - esac - shift -done - -warn "## Running $0" - -if [[ "${HOST:0:6}" == "CYGWIN" || "$USE_MINGW" == "1" ]]; then - # This is either Cygwin or Linux/Mingw cross-compiling to Windows. - PLATFORM="windows-x86" - if [[ "${HOST:0:6}" == "CYGWIN" ]]; then - # We can't use symlinks under Cygwin - USE_COPY="1" - fi -elif [[ "$HOST" == "Linux" ]]; then - PLATFORM="linux-x86" -elif [[ "$HOST" == "Darwin" ]]; then - PLATFORM="darwin-x86" -else - die "Unsupported platform ($HOST). Aborting." -fi - -if [[ "$USE_COPY" == "1" ]]; then - function cpfile { # $1=source $2=dest $3=optional dest filename - cp -fv $1 $2/$3 - } -else - # computes the "reverse" path, e.g. "a/b/c" => "../../.." - function back() { - echo $1 | sed 's@[^/]*@..@g' - } - - function cpfile { # $1=source $2=dest $3=optional dest filename - local src=$1 - if [[ "${src:0:1}" != "/" ]]; then - # Not an absolute path. We assume a relative path to be - # relative to the android root and we want to make it - # relative to the destination dir. - src=$(back $2)/$1 - fi - ln -svf $src $2/$3 - } -fi - -DEST="sdk/eclipse/scripts" - -set -e # fail early -LIBS="" -CP_FILES="" - - -### Configure which libs to build. -# -# Each entry for LIBS needs to be prefixed with the way we want to build it: -# make: - a library built using its traditional Android.mk -# base: - a gradle library located in tools/base -# swt: - a gradle library located in toosl/swt -# -# LIBS entries without or with an unknown ":" prefix will generate an error. - -### BASE ### - -BASE_PLUGIN_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.base/libs" -BASE_PLUGIN_LIBS="base:common swt:sdkstats base:sdklib base:dvlib base:layoutlib-api base:sdk-common" -BASE_PLUGIN_PREBUILTS="\ - prebuilts/tools/common/m2/repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar \ - prebuilts/tools/common/m2/repository/org/apache/commons/commons-compress/1.0/commons-compress-1.0.jar \ - prebuilts/tools/common/m2/repository/com/google/guava/guava/15.0/guava-15.0.jar \ - prebuilts/tools/common/m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar \ - prebuilts/tools/common/m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar \ - prebuilts/tools/common/m2/repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar \ - prebuilts/tools/common/m2/repository/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar \ - prebuilts/tools/common/m2/repository/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar" - -# temporarily disabled -# prebuilts/tools/common/m2/repository/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar \ -# prebuilts/tools/common/m2/repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar" - -LIBS="$LIBS $BASE_PLUGIN_LIBS" -CP_FILES="$CP_FILES @:$BASE_PLUGIN_DEST $BASE_PLUGIN_LIBS $BASE_PLUGIN_PREBUILTS" - - -### ADT ### - -ADT_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.adt/libs" -ADT_LIBS="make:ant-glob base:asset-studio base:lint-api base:lint-checks base:ninepatch make:propertysheet \ - base:rule-api swt:sdkuilib swt:swtmenubar base:manifest-merger" -ADT_PREBUILTS="\ - prebuilts/tools/common/freemarker/freemarker-2.3.19.jar \ - prebuilts/tools/common/m2/repository/org/ow2/asm/asm/4.0/asm-4.0.jar \ - prebuilts/tools/common/m2/repository/org/ow2/asm/asm-tree/4.0/asm-tree-4.0.jar \ - prebuilts/tools/common/m2/repository/org/ow2/asm/asm-analysis/4.0/asm-analysis-4.0.jar \ - prebuilts/tools/common/m2/repository/com/android/tools/external/lombok/lombok-ast/0.2.2/lombok-ast-0.2.2.jar" - -LIBS="$LIBS $ADT_LIBS" -CP_FILES="$CP_FILES @:$ADT_DEST $ADT_LIBS $ADT_PREBUILTS" - - -### DDMS ### - -DDMS_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.ddms/libs" -DDMS_LIBS="base:ddmlib swt:ddmuilib swt:swtmenubar swt:uiautomatorviewer" - -DDMS_PREBUILTS="\ - prebuilts/tools/common/m2/repository/jfree/jcommon/1.0.12/jcommon-1.0.12.jar \ - prebuilts/tools/common/m2/repository/jfree/jfreechart/1.0.9/jfreechart-1.0.9.jar \ - prebuilts/tools/common/m2/repository/jfree/jfreechart-swt/1.0.9/jfreechart-swt-1.0.9.jar" - -LIBS="$LIBS $DDMS_LIBS" -CP_FILES="$CP_FILES @:$DDMS_DEST $DDMS_LIBS $DDMS_PREBUILTS" - - -### TEST ### - -TEST_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.tests" -TEST_LIBS="make:easymock base:testutils" -TEST_PREBUILTS="prebuilts/tools/common/m2/repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar" - -LIBS="$LIBS $TEST_LIBS" -CP_FILES="$CP_FILES @:$TEST_DEST $TEST_LIBS $TEST_PREBUILTS" - - -### BRIDGE ### - -if [[ $PLATFORM != "windows-x86" ]]; then - # We can't build enough of the platform on Cygwin to create layoutlib - BRIDGE_LIBS="make:layoutlib base:ninepatch" - - LIBS="$LIBS $BRIDGE_LIBS" -fi - - -### HIERARCHYVIEWER ### - -HV_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer/libs" -HV_LIBS="swt:hierarchyviewer2lib swt:swtmenubar" - -LIBS="$LIBS $HV_LIBS" -CP_FILES="$CP_FILES @:$HV_DEST $HV_LIBS" - - -### TRACEVIEW ### - -TV_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.traceview/libs" -TV_LIBS="swt:traceview" - -LIBS="$LIBS $TV_LIBS" -CP_FILES="$CP_FILES @:$TV_DEST $TV_LIBS" - - -### MONITOR ### - -MONITOR_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.monitor/libs" -MONITOR_LIBS="swt:sdkuilib" - -LIBS="$LIBS $MONITOR_LIBS" -CP_FILES="$CP_FILES @:$MONITOR_DEST $MONITOR_LIBS" - - -### SDKMANAGER ### - -SDKMAN_LIBS="swt:swtmenubar" - -LIBS="$LIBS $SDKMAN_LIBS" - - -### GL DEBUGGER ### - -if [[ $PLATFORM != "windows-x86" ]]; then - # liblzf doesn't build under cygwin. If necessary, this should be fixed first. - - GLD_DEST="sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/libs" - GLD_LIBS="make:host-libprotobuf-java-2.3.0-lite make:liblzf" - - LIBS="$LIBS $GLD_LIBS" - CP_FILES="$CP_FILES @:$GLD_DEST $GLD_LIBS" -fi - - -#--- Determine what to build - -UNPROCESSED="" -GRADLE_SWT="" -GRADLE_BASE="" -MAKE_TARGETS="" -for LIB in $LIBS; do - if [[ "${LIB:0:5}" == "base:" ]]; then - GRADLE_BASE="$GRADLE_BASE :${LIB:5}:assemble" - elif [[ "${LIB:0:4}" == "swt:" ]]; then - GRADLE_SWT="$GRADLE_SWT :${LIB:4}:assemble" - elif [[ "${LIB:0:5}" == "make:" ]]; then - MAKE_TARGETS="$MAKE_TARGETS ${LIB:5}" - else - UNPROCESSED="$UNPROCESSED $LIB" - fi -done - -unset LIBS # we shouldn't use this anymore, it has been split up just above. - - -if [[ -n $UNPROCESSED ]]; then - die "## The following libs lack a prefix (make:, base: or swt:): $UNPROCESSED" -fi - -# In the mode to only echo dependencies, output them and we're done -if [[ -n $ONLY_SHOW_DEPS ]]; then - echo $MAKE_TARGETS - exit 0 -fi - -# --- Gradle Build --- - -# tools/base: if we need it for SWT, we build them all and public local. -# Otherwise we do a specific tools/base build on just the requested targets. - -if [[ -n "$GRADLE_SWT" ]]; then - echo "### Starting tools/base: gradlew assemble publishLocal" - (cd tools/base && ./gradlew assemble publishLocal) -elif [[ -n "$GRADLE_BASE" ]]; then - echo "### Starting tools/base: gradlew $GRADLE_BASE" - (cd tools/base && ./gradlew $GRADLE_BASE) -fi - -# tools/swt: build requested targets - -if [[ -n "$GRADLE_SWT" ]]; then - echo "### Starting tools/swt: gradlew $GRADLE_SWT" - (cd tools/swt && ./gradlew $GRADLE_SWT) -fi - -# --- Android.mk Build --- - -# If some of the libs are available in prebuilts/devtools, use link to them directly -# instead of trying to rebuild them so remove them from the libs to build. Note that -# they are already listed in CP_FILES so we'll adjust the source to copy later. - -NEW_TARGETS="" -for LIB in $MAKE_TARGETS; do - J="prebuilts/devtools/tools/lib/$LIB.jar" - if [[ ! -f $J ]]; then - J="prebuilts/devtools/adt/lib/$LIB.jar" - fi - if [[ -f $J ]]; then - warn "## Using existing $J" - else - NEW_TARGETS="$NEW_TARGETS $LIB" - fi -done -MAKE_TARGETS="$NEW_TARGETS" -unset NEW_TARGETS - -if [[ -z $ONLY_COPY_DEPS ]]; then - if [[ -n $MAKE_TARGETS ]]; then - ( # Make sure we have lunch sdk-<something> - if [[ ! "$TARGET_PRODUCT" ]]; then - warn "## TARGET_PRODUCT is not set, running build/envsetup.sh" - . build/envsetup.sh - warn "## lunch sdk-eng" - lunch sdk-eng - fi - - J="4" - [[ $(uname) == "Darwin" ]] && J=$(sysctl hw.ncpu | cut -d : -f 2 | tr -d ' ') - [[ $(uname) == "Linux" ]] && J=$(cat /proc/cpuinfo | grep processor | wc -l) - - warn "## Building libs: make -j$J $MAKE_TARGETS" - make -j${J} $MAKE_TARGETS - ) - fi -fi - -# --- Copy resulting files --- - -DEST="" -for SRC in $CP_FILES; do - if [[ "${SRC:0:2}" == "@:" ]]; then - DEST="${SRC:2}" - mkdir -vp "$DEST" - continue - fi - - ORIG_SRC="$SRC" - DEST_FILE="" - - if [[ "${SRC:0:5}" == "base:" ]]; then - SRC="${SRC:5}" - ORIG_SRC="$SRC" - DEST_FILE="$SRC.jar" - SRC=$(printGradleJarPath tools/base $SRC) - elif [[ "${SRC:0:4}" == "swt:" ]]; then - SRC="${SRC:4}" - ORIG_SRC="$SRC" - DEST_FILE="$SRC.jar" - SRC=$(printGradleJarPath tools/swt $SRC) - elif [[ "${SRC:0:5}" == "make:" ]]; then - SRC="${SRC:5}" - ORIG_SRC="$SRC" - fi - - if [[ ! -f "$SRC" ]]; then - # Take a prebuilts/devtools instead of a framework one if possible. - SRC="prebuilts/devtools/tools/lib/$SRC.jar" - if [[ ! -f "$SRC" ]]; then - SRC="prebuilts/devtools/adt/lib/$ORIG_SRC.jar" - fi - if [[ ! -f "$SRC" ]]; then - SRC="out/host/$PLATFORM/framework/$ORIG_SRC.jar" - fi - fi - if [[ -f "$SRC" ]]; then - if [[ ! -d "$DEST" ]]; then - die "Invalid cp_file dest directory: $DEST" - fi - - cpfile "$SRC" "$DEST" "$DEST_FILE" - else - die "## Unknown source '$ORIG_SRC' to copy in '$DEST'" - fi -done - -# OS-specific post operations - -if [ "${HOST:0:6}" == "CYGWIN" ]; then - chmod -v a+rx "$ADT_DEST"/*.jar -fi - -echo "### $0 done" diff --git a/eclipse/scripts/setup_eclipse.sh b/eclipse/scripts/setup_eclipse.sh deleted file mode 100755 index 5942c06..0000000 --- a/eclipse/scripts/setup_eclipse.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash - -# Quick script used to setup Eclipse for the ADT plugin build. -# -# usage: -# setup_eclipse.sh [-p] <dest_dir> -# -p: run Eclipse in the background and print its PID in dest_dir/eclipse.pid -# -# Workflow: -# - downloads & unpack Eclipse if necessary -# - *runs* it once - - -#----------------- -# -# Note: right now this is invoked by sdk/eclipse/doBuild.sh -# and it *MUST* be invoked with the following destination directory: -# -# $ setup_eclipse.sh /buildbot/eclipse-android/3.4.0/ -# -#----------------- - - -set -e # abort this script early if any command fails - -function die() { - echo $@ - exit 1 -} - -V="--no-verbose" -if [[ "$1" == "-v" ]]; then - V="" - shift -fi - -if [[ "-p" == "$1" ]]; then - GET_PID="-p" - shift -fi - - -BASE_DIR="$1" - -[[ -n "$1" ]] || die "Usage: $0 <dest-dir>" - -# URL for Eclipse Linux RCP. -DOWNLOAD_URL="http://archive.eclipse.org/technology/epp/downloads/release/helios/SR2/eclipse-rcp-helios-SR2-linux-gtk-x86_64.tar.gz" - -# URL for CDT -CDT_DOWNLOAD_URL="http://download.eclipse.org/tools/cdt/releases/helios/dist/cdt-master-7.0.2.zip" - -BIN="$BASE_DIR/eclipse/eclipse" # path to installed binary -TARGZ="$BASE_DIR/${DOWNLOAD_URL##*/}" # base dir + filename of the download URL -CDTZIP="$BASE_DIR/${CDT_DOWNLOAD_URL##*/}" - -if [[ ! -f "$BIN" ]]; then - echo "Downloading and installing Eclipse in $BASE_DIR." - mkdir -p "$BASE_DIR" - - wget --continue $V --output-document="$TARGZ" "$DOWNLOAD_URL" - echo "Unpacking $TARGZ" - (cd "$BASE_DIR" && tar xzf "$TARGZ") - - wget --continue $V --output-document="$CDTZIP" "$CDT_DOWNLOAD_URL" - echo "Unpacking $CDTZIP" - (cd "$BASE_DIR/eclipse" && unzip -o "$CDTZIP") - - echo - echo "*** WARNING: To setup Eclipse correctly, it must be ran at least once manually" - echo "*** Eclipse will now start." - echo - if [[ -n "$GET_PID" ]]; then - # if started from the automatic eclipse build, run Eclipse in the background - "$BIN" & - ECLIPSE_PID=$! - echo "*** Eclipse started in background with PID $ECLIPSE_PID" - echo "$ECLIPSE_PID" > "$BASE_DIR"/eclipse.pid - sleep 5 # give some time for Eclipse to start and setup its environment - else - # if started manually, run Eclipse in the foreground - "$BIN" - fi -fi - diff --git a/eclipse/sites/external/site.xml b/eclipse/sites/external/site.xml index 6c04125..bc262b6 100644 --- a/eclipse/sites/external/site.xml +++ b/eclipse/sites/external/site.xml @@ -3,22 +3,22 @@ <description url="https://dl-ssl.google.com/android/eclipse/"> Update Site for Android Development Toolkit </description> - <feature url="features/com.android.ide.eclipse.adt_23.0.4.qualifier.jar" id="com.android.ide.eclipse.adt" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.adt_24.0.2.qualifier.jar" id="com.android.ide.eclipse.adt" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.ddms_23.0.4.qualifier.jar" id="com.android.ide.eclipse.ddms" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.ddms_24.0.2.qualifier.jar" id="com.android.ide.eclipse.ddms" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.hierarchyviewer_23.0.4.qualifier.jar" id="com.android.ide.eclipse.hierarchyviewer" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.hierarchyviewer_24.0.2.qualifier.jar" id="com.android.ide.eclipse.hierarchyviewer" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.traceview_23.0.4.qualifier.jar" id="com.android.ide.eclipse.traceview" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.traceview_24.0.2.qualifier.jar" id="com.android.ide.eclipse.traceview" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.gldebugger_23.0.4.qualifier.jar" id="com.android.ide.eclipse.gldebugger" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.gldebugger_24.0.2.qualifier.jar" id="com.android.ide.eclipse.gldebugger" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.ndk_23.0.4.qualifier.jar" id="com.android.ide.eclipse.ndk" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.ndk_24.0.2.qualifier.jar" id="com.android.ide.eclipse.ndk" version="24.0.2.qualifier"> <category name="ndk"/> </feature> <category-def name="developer" label="Developer Tools"> diff --git a/eclipse/sites/internal/site.xml b/eclipse/sites/internal/site.xml index 41c6929..b77ab7f 100644 --- a/eclipse/sites/internal/site.xml +++ b/eclipse/sites/internal/site.xml @@ -3,32 +3,32 @@ <description url="https://android.corp.google.com/adt/"> Update Site for Android Development Toolkit </description> - <feature url="features/com.android.ide.eclipse.adt_23.0.4.qualifier.jar" id="com.android.ide.eclipse.adt" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.adt_24.0.2.qualifier.jar" id="com.android.ide.eclipse.adt" version="24.0.2.qualifier"> <category name="developer"/> </feature> - <feature url="features/com.android.ide.eclipse.ddms_23.0.4.qualifier.jar" id="com.android.ide.eclipse.ddms" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.ddms_24.0.2.qualifier.jar" id="com.android.ide.eclipse.ddms" version="24.0.2.qualifier"> <category name="developer"/> <category name="platform"/> </feature> - <feature url="features/com.android.ide.eclipse.hierarchyviewer_23.0.4.qualifier.jar" id="com.android.ide.eclipse.hierarchyviewer" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.hierarchyviewer_24.0.2.qualifier.jar" id="com.android.ide.eclipse.hierarchyviewer" version="24.0.2.qualifier"> <category name="developer"/> <category name="platform"/> </feature> - <feature url="features/com.android.ide.eclipse.tests_23.0.4.qualifier.jar" id="com.android.ide.eclipse.tests" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.tests_24.0.2.qualifier.jar" id="com.android.ide.eclipse.tests" version="24.0.2.qualifier"> <category name="test"/> </feature> - <feature url="features/com.android.ide.eclipse.pdt_23.0.4.qualifier.jar" id="com.android.ide.eclipse.pdt" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.pdt_24.0.2.qualifier.jar" id="com.android.ide.eclipse.pdt" version="24.0.2.qualifier"> <category name="platform"/> </feature> - <feature url="features/com.android.ide.eclipse.traceview_23.0.4.qualifier.jar" id="com.android.ide.eclipse.traceview" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.traceview_24.0.2.qualifier.jar" id="com.android.ide.eclipse.traceview" version="24.0.2.qualifier"> <category name="developer"/> <category name="platform"/> </feature> - <feature url="features/com.android.ide.eclipse.gldebugger_23.0.4.qualifier.jar" id="com.android.ide.eclipse.gldebugger" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.gldebugger_24.0.2.qualifier.jar" id="com.android.ide.eclipse.gldebugger" version="24.0.2.qualifier"> <category name="developer"/> <category name="platform"/> </feature> - <feature url="features/com.android.ide.eclipse.ndk_23.0.4.qualifier.jar" id="com.android.ide.eclipse.ndk" version="23.0.4.qualifier"> + <feature url="features/com.android.ide.eclipse.ndk_24.0.2.qualifier.jar" id="com.android.ide.eclipse.ndk" version="24.0.2.qualifier"> <category name="developer"/> <category name="platform"/> </feature> |