aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eclipse/features/com.android.ide.eclipse.adt/feature.xml2
-rw-r--r--eclipse/features/com.android.ide.eclipse.ddms/feature.xml2
-rw-r--r--eclipse/features/com.android.ide.eclipse.tests/feature.xml2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/META-INF/MANIFEST.MF2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/META-INF/MANIFEST.MF2
-rw-r--r--eclipse/sites/external/site.xml4
-rw-r--r--eclipse/sites/internal/site.xml6
-rwxr-xr-xsdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RemotePackagesPage.java23
-rwxr-xr-xsdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RepoSourcesAdapter.java134
-rwxr-xr-xsdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java21
-rwxr-xr-xsdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/nopkg_icon16.pngbin0 -> 397 bytes
12 files changed, 130 insertions, 70 deletions
diff --git a/eclipse/features/com.android.ide.eclipse.adt/feature.xml b/eclipse/features/com.android.ide.eclipse.adt/feature.xml
index 74002cb..6dd3ee7 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"
label="Android Development Tools"
- version="0.9.2.qualifier"
+ version="0.9.3.qualifier"
provider-name="The Android Open Source Project"
plugin="com.android.ide.eclipse.adt">
diff --git a/eclipse/features/com.android.ide.eclipse.ddms/feature.xml b/eclipse/features/com.android.ide.eclipse.ddms/feature.xml
index 884669b..e67f960 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"
label="Android DDMS"
- version="0.9.2.qualifier"
+ version="0.9.3.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 d2778fe..cc34045 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="0.9.2.qualifier"
+ version="0.9.3.qualifier"
provider-name="The Android Open Source Project">
<copyright>
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 f9c1e9c..32c939b 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: 0.9.2.qualifier
+Bundle-Version: 0.9.3.qualifier
Bundle-ClassPath: .,
jarutils.jar,
androidprefs.jar,
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 ebdec6d..9f021ae 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: Dalvik Debug Monitor Service
Bundle-SymbolicName: com.android.ide.eclipse.ddms;singleton:=true
-Bundle-Version: 0.9.2.qualifier
+Bundle-Version: 0.9.3.qualifier
Bundle-Activator: com.android.ide.eclipse.ddms.DdmsPlugin
Bundle-Vendor: The Android Open Source Project
Bundle-Localization: plugin
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 61bfbe4..a8ec3da 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: 0.9.2.qualifier
+Bundle-Version: 0.9.3.qualifier
Bundle-Activator: com.android.ide.eclipse.tests.AndroidTestPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
diff --git a/eclipse/sites/external/site.xml b/eclipse/sites/external/site.xml
index 7dee775..a00d1a4 100644
--- a/eclipse/sites/external/site.xml
+++ b/eclipse/sites/external/site.xml
@@ -3,10 +3,10 @@
<description url="https://dl-ssl.google.com/android/eclipse/">
Update Site for Android Development Toolkit
</description>
- <feature url="features/com.android.ide.eclipse.adt_0.9.2.qualifier.jar" id="com.android.ide.eclipse.adt" version="0.9.2.qualifier">
+ <feature url="features/com.android.ide.eclipse.adt_0.9.3.qualifier.jar" id="com.android.ide.eclipse.adt" version="0.9.3.qualifier">
<category name="developer"/>
</feature>
- <feature url="features/com.android.ide.eclipse.ddms_0.9.2.qualifier.jar" id="com.android.ide.eclipse.ddms" version="0.9.2.qualifier">
+ <feature url="features/com.android.ide.eclipse.ddms_0.9.3.qualifier.jar" id="com.android.ide.eclipse.ddms" version="0.9.3.qualifier">
<category name="developer"/>
</feature>
<category-def name="developer" label="Developer Tools">
diff --git a/eclipse/sites/internal/site.xml b/eclipse/sites/internal/site.xml
index 4fd5333..e19c119 100644
--- a/eclipse/sites/internal/site.xml
+++ b/eclipse/sites/internal/site.xml
@@ -3,13 +3,13 @@
<description url="https://android.corp.google.com/adt/">
Update Site for Android Development Toolkit
</description>
- <feature url="features/com.android.ide.eclipse.adt_0.9.2.qualifier.jar" id="com.android.ide.eclipse.adt" version="0.9.2.qualifier">
+ <feature url="features/com.android.ide.eclipse.adt_0.9.3.qualifier.jar" id="com.android.ide.eclipse.adt" version="0.9.3.qualifier">
<category name="developer"/>
</feature>
- <feature url="features/com.android.ide.eclipse.ddms_0.9.2.qualifier.jar" id="com.android.ide.eclipse.ddms" version="0.9.2.qualifier">
+ <feature url="features/com.android.ide.eclipse.ddms_0.9.3.qualifier.jar" id="com.android.ide.eclipse.ddms" version="0.9.3.qualifier">
<category name="developer"/>
</feature>
- <feature url="features/com.android.ide.eclipse.tests_0.9.2.qualifier.jar" id="com.android.ide.eclipse.tests" version="0.9.2.qualifier">
+ <feature url="features/com.android.ide.eclipse.tests_0.9.3.qualifier.jar" id="com.android.ide.eclipse.tests" version="0.9.3.qualifier">
<category name="test"/>
</feature>
<category-def name="developer" label="Application Developer Tools">
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RemotePackagesPage.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RemotePackagesPage.java
index a7c1a83..6ea040c 100755
--- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RemotePackagesPage.java
+++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RemotePackagesPage.java
@@ -62,7 +62,6 @@ public class RemotePackagesPage extends Composite implements ISdkListener {
private Group mDescriptionContainer;
private Button mAddSiteButton;
private Button mDeleteSiteButton;
- private Label mPlaceholder3;
private Button mRefreshButton;
private Button mInstallSelectedButton;
private Label mDescriptionLabel;
@@ -118,16 +117,6 @@ public class RemotePackagesPage extends Composite implements ISdkListener {
spacer.setLayoutData(gd = new GridData(GridData.FILL_HORIZONTAL));
gd.heightHint = 0;
- mUpdateOnlyCheckBox = new Button(composite, SWT.CHECK);
- mUpdateOnlyCheckBox.setText("Display updates only");
- mUpdateOnlyCheckBox.setSelection(mUpdaterData.getSettingsController().getShowUpdateOnly());
- mUpdateOnlyCheckBox.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent arg0) {
- onShowUpdateOnly(); //$hide$
- }
- });
-
mDescriptionContainer = new Group(parent, SWT.NONE);
mDescriptionContainer.setLayout(new GridLayout(1, false));
mDescriptionContainer.setText("Description");
@@ -155,8 +144,16 @@ public class RemotePackagesPage extends Composite implements ISdkListener {
});
mDeleteSiteButton.setText("Delete Site...");
- mPlaceholder3 = new Label(parent, SWT.NONE);
- mPlaceholder3.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));
+ mUpdateOnlyCheckBox = new Button(parent, SWT.CHECK);
+ mUpdateOnlyCheckBox.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));
+ mUpdateOnlyCheckBox.setText("Display updates only");
+ mUpdateOnlyCheckBox.setSelection(mUpdaterData.getSettingsController().getShowUpdateOnly());
+ mUpdateOnlyCheckBox.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent arg0) {
+ onShowUpdateOnly(); //$hide$
+ }
+ });
mRefreshButton = new Button(parent, SWT.NONE);
mRefreshButton.addSelectionListener(new SelectionAdapter() {
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RepoSourcesAdapter.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RepoSourcesAdapter.java
index dbf46f5..de12666 100755
--- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RepoSourcesAdapter.java
+++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/RepoSourcesAdapter.java
@@ -43,6 +43,11 @@ public class RepoSourcesAdapter {
private final UpdaterData mUpdaterData;
+ /**
+ * A dummy RepoSource entry returned for sources which had load errors.
+ * It displays a summary of the error as its short description or
+ * it displays the source's long description.
+ */
public static class RepoSourceError implements IDescription {
private final RepoSource mSource;
@@ -60,6 +65,33 @@ public class RepoSourcesAdapter {
}
}
+ /**
+ * A dummy RepoSource entry returned for sources with no packages.
+ * We need that to force the SWT tree to display an open/close triangle
+ * even for empty sources.
+ */
+ public static class RepoSourceEmpty implements IDescription {
+
+ private final RepoSource mSource;
+ private final boolean mEmptyBecauseOfUpdateOnly;
+
+ public RepoSourceEmpty(RepoSource source, boolean emptyBecauseOfUpdateOnly) {
+ mSource = source;
+ mEmptyBecauseOfUpdateOnly = emptyBecauseOfUpdateOnly;
+ }
+
+ public String getLongDescription() {
+ return mSource.getLongDescription();
+ }
+
+ public String getShortDescription() {
+ if (mEmptyBecauseOfUpdateOnly) {
+ return "Some packages were found but are not compatible updates.";
+ } else {
+ return "No packages found";
+ }
+ }
+ }
public RepoSourcesAdapter(UpdaterData updaterData) {
mUpdaterData = updaterData;
@@ -137,48 +169,76 @@ public class RepoSourcesAdapter {
return mUpdaterData.getSources().getSources();
} else if (parentElement instanceof RepoSource) {
- final RepoSource source = (RepoSource) parentElement;
- Package[] packages = source.getPackages();
+ return getRepoSourceChildren((RepoSource) parentElement);
+
+ } else if (parentElement instanceof Package) {
+ return getPackageChildren((Package) parentElement);
+ }
+
+ return new Object[0];
+ }
- if (packages == null && source.getFetchError() == null) {
- final boolean forceHttp = mUpdaterData.getSettingsController().getForceHttp();
+ /**
+ * Returns the list of packages for this repo source, eventually filtered to display
+ * only update packages. If the list is empty, returns a specific empty node. If there's
+ * an error, returns a specific error node.
+ */
+ private Object[] getRepoSourceChildren(final RepoSource source) {
+ Package[] packages = source.getPackages();
- mUpdaterData.getTaskFactory().start("Loading Source", new ITask() {
- public void run(ITaskMonitor monitor) {
- source.load(monitor, forceHttp);
- }
- });
+ if (packages == null && source.getFetchError() == null) {
+ final boolean forceHttp = mUpdaterData.getSettingsController().getForceHttp();
- packages = source.getPackages();
- }
- if (packages != null) {
- // filter out only the packages that are new/upgrade.
- if (mUpdaterData.getSettingsController().getShowUpdateOnly()) {
- return filteredPackages(packages);
+ mUpdaterData.getTaskFactory().start("Loading Source", new ITask() {
+ public void run(ITaskMonitor monitor) {
+ source.load(monitor, forceHttp);
}
- return packages;
- } else if (source.getFetchError() != null) {
- // Return a dummy entry to display the fetch error
- return new Object[] { new RepoSourceError(source) };
- }
+ });
- } else if (parentElement instanceof Package) {
- Archive[] archives = ((Package) parentElement).getArchives();
- if (mUpdaterData.getSettingsController().getShowUpdateOnly()) {
- for (Archive archive : archives) {
- // if we only want the compatible archives, then we just take the first
- // one. it's unlikely there are 2 compatible archives for the same
- // package
- if (archive.isCompatible()) {
- return new Object[] { archive };
- }
+ packages = source.getPackages();
+ }
+
+ boolean wasEmptyBeforeFilter = (packages == null || packages.length == 0);
+
+ // filter out only the packages that are new/upgrade.
+ if (packages != null && mUpdaterData.getSettingsController().getShowUpdateOnly()) {
+ packages = filteredPackages(packages);
+ }
+ if (packages != null && packages.length == 0) {
+ packages = null;
+ }
+
+ if (packages != null && source.getFetchError() != null) {
+ // Return a dummy entry to display the fetch error
+ return new Object[] { new RepoSourceError(source) };
+ }
+
+ // Either return a non-null package list or create a new empty node
+ if (packages != null) {
+ return packages;
+ } else {
+ return new Object[] { new RepoSourceEmpty(source, !wasEmptyBeforeFilter) } ;
+ }
+ }
+
+ /**
+ * Returns the list of archives for the given package, eventually filtering it
+ * to only show the compatible archives.
+ */
+ private Object[] getPackageChildren(Package pkg) {
+ Archive[] archives = pkg.getArchives();
+ if (mUpdaterData.getSettingsController().getShowUpdateOnly()) {
+ for (Archive archive : archives) {
+ // if we only want the compatible archives, then we just take the first
+ // one. it's unlikely there are 2 compatible archives for the same
+ // package
+ if (archive.isCompatible()) {
+ return new Object[] { archive };
}
}
-
- return archives;
}
- return new Object[0];
+ return archives;
}
/**
@@ -213,7 +273,7 @@ public class RepoSourcesAdapter {
* @param remotePackages the list of packages to filter.
* @return a non null (but maybe empty) list of new or update packages.
*/
- private Object[] filteredPackages(Package[] remotePackages) {
+ private Package[] filteredPackages(Package[] remotePackages) {
// get the installed packages
Package[] installedPackages = mUpdaterData.getInstalledPackage();
@@ -233,10 +293,10 @@ public class RepoSourcesAdapter {
if (info == UpdateInfo.UPDATE) {
filteredList.add(remotePkg);
newPkg = false;
- break; // there shouldn't be 2 revision of the same package
+ break; // there shouldn't be 2 revisions of the same package
} else if (info != UpdateInfo.INCOMPATIBLE) {
newPkg = false;
- break; // there shouldn't be 2 revision of the same package
+ break; // there shouldn't be 2 revisions of the same package
}
}
@@ -247,6 +307,6 @@ public class RepoSourcesAdapter {
}
}
- return filteredList.toArray();
+ return filteredList.toArray(new Package[filteredList.size()]);
}
}
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java
index bd39c5e..cbd846e 100755
--- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java
+++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/ImageFactory.java
@@ -91,31 +91,34 @@ public class ImageFactory {
*/
public Image getImageForObject(Object object) {
if (object instanceof RepoSource) {
- return getImageByName("source_icon16.png");
+ return getImageByName("source_icon16.png"); //$NON-NLS-1$
} else if (object instanceof RepoSourcesAdapter.RepoSourceError) {
- return getImageByName("error_icon16.png");
+ return getImageByName("error_icon16.png"); //$NON-NLS-1$
+
+ } else if (object instanceof RepoSourcesAdapter.RepoSourceEmpty) {
+ return getImageByName("nopkg_icon16.png"); //$NON-NLS-1$
} else if (object instanceof PlatformPackage) {
- return getImageByName("android_icon_16.png");
+ return getImageByName("android_icon_16.png"); //$NON-NLS-1$
} else if (object instanceof AddonPackage) {
- return getImageByName("addon_icon16.png");
+ return getImageByName("addon_icon16.png"); //$NON-NLS-1$
} else if (object instanceof ToolPackage) {
- return getImageByName("tool_icon16.png");
+ return getImageByName("tool_icon16.png"); //$NON-NLS-1$
} else if (object instanceof DocPackage) {
- return getImageByName("doc_icon16.png");
+ return getImageByName("doc_icon16.png"); //$NON-NLS-1$
} else if (object instanceof ExtraPackage) {
- return getImageByName("extra_icon16.png");
+ return getImageByName("extra_icon16.png"); //$NON-NLS-1$
} else if (object instanceof Archive) {
if (((Archive) object).isCompatible()) {
- return getImageByName("archive_icon16.png");
+ return getImageByName("archive_icon16.png"); //$NON-NLS-1$
} else {
- return getImageByName("incompat_icon16.png");
+ return getImageByName("incompat_icon16.png"); //$NON-NLS-1$
}
}
return null;
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/nopkg_icon16.png b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/nopkg_icon16.png
new file mode 100755
index 0000000..147837f
--- /dev/null
+++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/nopkg_icon16.png
Binary files differ