aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-06-22 17:55:45 -0700
committerXavier Ducrohet <xav@android.com>2010-06-24 12:45:23 -0700
commite312b2800018fcfe7fad0b1c883127f1364a17d0 (patch)
tree96387c7e4c71e7ffa79d08223da9cc512fd3371f /eclipse/plugins
parent44bee48407df99d758a36b24ae68077006de0c63 (diff)
downloadsdk-e312b2800018fcfe7fad0b1c883127f1364a17d0.zip
sdk-e312b2800018fcfe7fad0b1c883127f1364a17d0.tar.gz
sdk-e312b2800018fcfe7fad0b1c883127f1364a17d0.tar.bz2
Make ddmlib/ddmuilib jar files inside the ddms plug-in instead of symlinks.
Also cleaned up the abstraction layer to load images from ddmuilib since its image are now always located inside ddmuilib jar. Change-Id: Id9d283df18a05b7b5593e4593e90dac6e5548b94
Diffstat (limited to 'eclipse/plugins')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/.classpath22
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF22
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/build.properties14
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/libs/.gitignore1
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java15
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java40
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java5
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java7
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java4
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java6
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/.classpath2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/META-INF/MANIFEST.MF8
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/build.properties7
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/icons/.gitignore31
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/icons/capture.pngbin696 -> 0 bytes
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml4
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/.gitignore2
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java14
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/ImageLoader.java67
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java32
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EmulatorControlView.java3
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EventLogView.java30
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/FileExplorerView.java26
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/LogCatView.java18
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.tests/.classpath10
25 files changed, 116 insertions, 274 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/.classpath b/eclipse/plugins/com.android.ide.eclipse.adt/.classpath
index e4e1d37..72ca4ed 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/.classpath
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/.classpath
@@ -3,15 +3,17 @@
<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 kind="lib" path="androidprefs.jar" sourcepath="/AndroidPrefs"/>
- <classpathentry kind="lib" path="sdkstats.jar" sourcepath="/SdkStatsService"/>
- <classpathentry kind="lib" path="kxml2-2.3.0.jar"/>
- <classpathentry kind="lib" path="layoutlib_api.jar"/>
- <classpathentry kind="lib" path="layoutlib_utils.jar"/>
- <classpathentry kind="lib" path="ninepatch.jar"/>
- <classpathentry kind="lib" path="sdklib.jar" sourcepath="/SdkLib"/>
- <classpathentry kind="lib" path="sdkuilib.jar" sourcepath="/SdkUiLib"/>
- <classpathentry kind="lib" path="commons-compress-1.0.jar"/>
- <classpathentry kind="lib" path="groovy-all-1.7.0.jar" sourcepath="/GroovySrc/groovy-src-1.7.0.zip"/>
+ <classpathentry kind="lib" path="libs/androidprefs.jar" sourcepath="/AndroidPrefs"/>
+ <classpathentry kind="lib" path="libs/commons-compress-1.0.jar"/>
+ <classpathentry kind="lib" path="libs/groovy-all-1.7.0.jar" sourcepath="/GroovySrc/groovy-src-1.7.0.zip"/>
+ <classpathentry kind="lib" path="libs/kxml2-2.3.0.jar"/>
+ <classpathentry kind="lib" path="libs/layoutlib_api.jar"/>
+ <classpathentry kind="lib" path="libs/layoutlib_utils.jar"/>
+ <classpathentry kind="lib" path="libs/ninepatch.jar"/>
+ <classpathentry kind="lib" path="libs/sdklib.jar" sourcepath="/SdkLib"/>
+ <classpathentry kind="lib" path="libs/sdkstats.jar" sourcepath="/SdkStatsService"/>
+ <classpathentry kind="lib" path="libs/sdkuilib.jar" sourcepath="/SdkUiLib"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ddmlib"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ddmuilib"/>
<classpathentry kind="output" path="bin"/>
</classpath>
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 729a997..25e8d3d 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
@@ -4,16 +4,16 @@ Bundle-Name: Android Development Toolkit
Bundle-SymbolicName: com.android.ide.eclipse.adt;singleton:=true
Bundle-Version: 0.9.8.qualifier
Bundle-ClassPath: .,
- androidprefs.jar,
- sdkstats.jar,
- kxml2-2.3.0.jar,
- layoutlib_api.jar,
- ninepatch.jar,
- layoutlib_utils.jar,
- sdklib.jar,
- sdkuilib.jar,
- commons-compress-1.0.jar,
- groovy-all-1.7.0.jar
+ libs/androidprefs.jar,
+ libs/sdklib.jar,
+ libs/sdkuilib.jar,
+ libs/ninepatch.jar,
+ libs/sdkstats.jar,
+ libs/commons-compress-1.0.jar,
+ libs/groovy-all-1.7.0.jar,
+ libs/kxml2-2.3.0.jar,
+ libs/layoutlib_api.jar,
+ libs/layoutlib_utils.jar
Bundle-Activator: com.android.ide.eclipse.adt.AdtPlugin
Bundle-Vendor: The Android Open Source Project
Require-Bundle: com.android.ide.eclipse.ddms,
@@ -54,6 +54,7 @@ Export-Package: com.android.ide.eclipse.adt;x-friends:="com.android.ide.eclipse.
com.android.ide.eclipse.adt.internal.build;x-friends:="com.android.ide.eclipse.tests",
com.android.ide.eclipse.adt.internal.editors;x-friends:="com.android.ide.eclipse.tests",
com.android.ide.eclipse.adt.internal.editors.descriptors;x-friends:="com.android.ide.eclipse.tests",
+ com.android.ide.eclipse.adt.internal.editors.export;x-friends:="com.android.ide.eclipse.tests",
com.android.ide.eclipse.adt.internal.editors.layout;x-friends:="com.android.ide.eclipse.tests",
com.android.ide.eclipse.adt.internal.editors.layout.configuration;x-friends:="com.android.ide.eclipse.tests",
com.android.ide.eclipse.adt.internal.editors.layout.descriptors;x-friends:="com.android.ide.eclipse.tests",
@@ -98,6 +99,7 @@ Export-Package: com.android.ide.eclipse.adt;x-friends:="com.android.ide.eclipse.
com.android.ninepatch;x-friends:="com.android.ide.eclipse.tests",
com.android.prefs;x-friends:="com.android.ide.eclipse.tests",
com.android.sdklib;x-friends:="com.android.ide.eclipse.tests",
+ com.android.sdklib.build;x-friends:="com.android.ide.eclipse.tests",
com.android.sdklib.internal.avd;x-friends:="com.android.ide.eclipse.tests",
com.android.sdklib.internal.build;x-friends:="com.android.ide.eclipse.tests",
com.android.sdklib.internal.export;x-friends:="com.android.ide.eclipse.tests",
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/build.properties b/eclipse/plugins/com.android.ide.eclipse.adt/build.properties
index 6fd3a05..12ba0bb 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/build.properties
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/build.properties
@@ -4,16 +4,8 @@ bin.includes = plugin.xml,\
.,\
templates/,\
about.ini,\
- androidprefs.jar,\
- sdkstats.jar,\
- kxml2-2.3.0.jar,\
- layoutlib_api.jar,\
- layoutlib_utils.jar,\
- ninepatch.jar,\
- sdklib.jar,\
- sdkuilib.jar,\
- commons-compress-1.0.jar,\
- groovy-all-1.7.0.jar,\
- gscripts/
+ gscripts/,\
+ libs/
source.. = src/
output.. = bin/
+bin.excludes = libs/.gitignore
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/libs/.gitignore b/eclipse/plugins/com.android.ide.eclipse.adt/libs/.gitignore
new file mode 100644
index 0000000..d392f0e
--- /dev/null
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/libs/.gitignore
@@ -0,0 +1 @@
+*.jar
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
index a9336b2..c6fda52 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
@@ -46,7 +46,6 @@ import com.android.ide.eclipse.adt.internal.sdk.Sdk.ITargetChangeListener;
import com.android.ide.eclipse.adt.internal.ui.EclipseUiHelper;
import com.android.ide.eclipse.adt.internal.wizards.export.ExportWizard;
import com.android.ide.eclipse.ddms.DdmsPlugin;
-import com.android.ide.eclipse.ddms.ImageLoader;
import com.android.sdklib.IAndroidTarget;
import com.android.sdklib.SdkConstants;
import com.android.sdkstats.SdkStatsService;
@@ -136,9 +135,6 @@ public class AdtPlugin extends AbstractUIPlugin {
/** Stream to write error messages to the android console */
private MessageConsoleStream mAndroidConsoleErrorStream;
- /** Image loader object */
- private ImageLoader mLoader;
-
/** Color used in the error console */
private Color mRed;
@@ -297,9 +293,6 @@ public class AdtPlugin extends AbstractUIPlugin {
// check the location of SDK
final boolean isSdkLocationValid = checkSdkLocationAndId();
- // create the loader that's able to load the images
- mLoader = new ImageLoader(this);
-
// start the DdmsPlugin by setting the adb location, only if it is set already.
String osSdkLocation = AdtPrefs.getPrefs().getOsSdkFolder();
if (osSdkLocation.length() > 0) {
@@ -385,14 +378,6 @@ public class AdtPlugin extends AbstractUIPlugin {
}
}
- /** Return the image loader for the plugin */
- public static synchronized ImageLoader getImageLoader() {
- if (sPlugin != null) {
- return sPlugin.mLoader;
- }
- return null;
- }
-
/**
* Returns the shared instance
*
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java
index d6c9cd8..a9c8af8 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java
@@ -21,10 +21,9 @@ import com.android.ddmlib.Client;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener;
import com.android.ddmlib.IDevice.DeviceState;
-import com.android.ddmuilib.IImageLoader;
-import com.android.ddmuilib.ImageHelper;
+import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.TableHelper;
-import com.android.ide.eclipse.adt.AdtPlugin;
+import com.android.ide.eclipse.adt.internal.editors.IconFactory;
import com.android.ide.eclipse.adt.internal.sdk.AdtConsoleSdkLog;
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
import com.android.ide.eclipse.ddms.DdmsPlugin;
@@ -254,12 +253,6 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
private void cleanup() {
// done listening.
AndroidDebugBridge.removeDeviceChangeListener(this);
-
- mEmulatorImage.dispose();
- mDeviceImage.dispose();
- mMatchImage.dispose();
- mNoMatchImage.dispose();
- mWarningImage.dispose();
}
@Override
@@ -440,41 +433,38 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
}
private void loadImages() {
- IImageLoader ddmsLoader = DdmsPlugin.getImageLoader();
+ ImageLoader ddmUiLibLoader = ImageLoader.getDdmUiLibLoader();
Display display = DdmsPlugin.getDisplay();
- IImageLoader adtLoader = AdtPlugin.getImageLoader();
+ IconFactory factory = IconFactory.getInstance();
if (mDeviceImage == null) {
- mDeviceImage = ImageHelper.loadImage(ddmsLoader, display,
+ mDeviceImage = ddmUiLibLoader.loadImage(display,
"device.png", //$NON-NLS-1$
ICON_WIDTH, ICON_WIDTH,
display.getSystemColor(SWT.COLOR_RED));
}
if (mEmulatorImage == null) {
- mEmulatorImage = ImageHelper.loadImage(ddmsLoader, display,
+ mEmulatorImage = ddmUiLibLoader.loadImage(display,
"emulator.png", ICON_WIDTH, ICON_WIDTH, //$NON-NLS-1$
display.getSystemColor(SWT.COLOR_BLUE));
}
if (mMatchImage == null) {
- mMatchImage = ImageHelper.loadImage(adtLoader, display,
- "match.png", //$NON-NLS-1$
- ICON_WIDTH, ICON_WIDTH,
- display.getSystemColor(SWT.COLOR_GREEN));
+ mMatchImage = factory.getIcon("match", //$NON-NLS-1$
+ IconFactory.COLOR_GREEN,
+ IconFactory.SHAPE_DEFAULT);
}
if (mNoMatchImage == null) {
- mNoMatchImage = ImageHelper.loadImage(adtLoader, display,
- "error.png", //$NON-NLS-1$
- ICON_WIDTH, ICON_WIDTH,
- display.getSystemColor(SWT.COLOR_RED));
+ mNoMatchImage = factory.getIcon("error", //$NON-NLS-1$
+ IconFactory.COLOR_RED,
+ IconFactory.SHAPE_DEFAULT);
}
if (mWarningImage == null) {
- mWarningImage = ImageHelper.loadImage(adtLoader, display,
- "warning.png", //$NON-NLS-1$
- ICON_WIDTH, ICON_WIDTH,
- display.getSystemColor(SWT.COLOR_YELLOW));
+ mNoMatchImage = factory.getIcon("warning", //$NON-NLS-1$
+ SWT.COLOR_YELLOW,
+ IconFactory.SHAPE_DEFAULT);
}
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java
index a4c7c1f..3705cc2 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/EmulatorConfigTab.java
@@ -16,13 +16,13 @@
package com.android.ide.eclipse.adt.internal.launch;
+import com.android.ddmuilib.ImageLoader;
import com.android.ide.eclipse.adt.AdtPlugin;
import com.android.ide.eclipse.adt.internal.launch.AndroidLaunchConfiguration.TargetMode;
import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs;
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
import com.android.ide.eclipse.adt.internal.sdk.AdtConsoleSdkLog;
import com.android.ide.eclipse.adt.internal.sdk.Sdk;
-import com.android.ide.eclipse.ddms.DdmsPlugin;
import com.android.prefs.AndroidLocation.AndroidLocationException;
import com.android.sdklib.IAndroidTarget;
import com.android.sdklib.NullSdkLog;
@@ -306,10 +306,9 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
@Override
public Image getImage() {
- return DdmsPlugin.getImageLoader().loadImage("emulator.png", null); //$NON-NLS-1$
+ return ImageLoader.getDdmUiLibLoader().loadImage("emulator.png", null); //$NON-NLS-1$
}
-
private void updateAvdList(AvdManager avdManager) {
if (avdManager == null) {
avdManager = Sdk.getCurrent().getAvdManager();
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java
index 6ef204c..7f49bc6 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/MainLaunchConfigTab.java
@@ -16,7 +16,7 @@
package com.android.ide.eclipse.adt.internal.launch;
-import com.android.ide.eclipse.adt.AdtPlugin;
+import com.android.ide.eclipse.adt.internal.editors.IconFactory;
import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
import com.android.ide.eclipse.adt.internal.project.ProjectChooserHelper;
import com.android.ide.eclipse.adt.internal.project.ProjectChooserHelper.NonLibraryProjectOnlyFilter;
@@ -62,7 +62,7 @@ public class MainLaunchConfigTab extends AbstractLaunchConfigurationTab {
/**
*
*/
- public static final String LAUNCH_TAB_IMAGE = "mainLaunchTab.png"; //$NON-NLS-1$
+ public static final String LAUNCH_TAB_IMAGE = "mainLaunchTab"; //$NON-NLS-1$
protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
@@ -204,10 +204,9 @@ public class MainLaunchConfigTab extends AbstractLaunchConfigurationTab {
@Override
public Image getImage() {
- return AdtPlugin.getImageLoader().loadImage(LAUNCH_TAB_IMAGE, null);
+ return IconFactory.getInstance().getIcon(LAUNCH_TAB_IMAGE);
}
-
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(
IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, mProjText.getText());
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java
index 4aacf5c..cd22110 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/junit/AndroidJUnitLaunchConfigurationTab.java
@@ -17,6 +17,7 @@ package com.android.ide.eclipse.adt.internal.launch.junit;
import com.android.ide.eclipse.adt.AdtPlugin;
import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.internal.editors.IconFactory;
import com.android.ide.eclipse.adt.internal.launch.LaunchMessages;
import com.android.ide.eclipse.adt.internal.launch.MainLaunchConfigTab;
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
@@ -491,8 +492,7 @@ public class AndroidJUnitLaunchConfigurationTab extends AbstractLaunchConfigurat
public Image getImage() {
// reuse icon from the Android App Launch config tab
if (mTabIcon == null) {
- mTabIcon = AdtPlugin.getImageLoader().loadImage(MainLaunchConfigTab.LAUNCH_TAB_IMAGE,
- null);
+ mTabIcon = IconFactory.getInstance().getIcon(MainLaunchConfigTab.LAUNCH_TAB_IMAGE);
}
return mTabIcon;
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java
index 631bb5f..d91113d 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/export/ProjectCheckPage.java
@@ -16,8 +16,8 @@
package com.android.ide.eclipse.adt.internal.wizards.export;
-import com.android.ide.eclipse.adt.AdtPlugin;
import com.android.ide.eclipse.adt.AndroidConstants;
+import com.android.ide.eclipse.adt.internal.editors.IconFactory;
import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
import com.android.ide.eclipse.adt.internal.project.ProjectChooserHelper;
@@ -227,7 +227,7 @@ final class ProjectCheckPage extends ExportWizardPage {
*/
private void addError(Composite parent, String message) {
if (mError == null) {
- mError = AdtPlugin.getImageLoader().loadImage(IMG_ERROR, mDisplay);
+ mError = IconFactory.getInstance().getIcon(IMG_ERROR);
}
new Label(parent, SWT.NONE).setImage(mError);
@@ -247,7 +247,7 @@ final class ProjectCheckPage extends ExportWizardPage {
*/
private void addWarning(Composite parent, String message) {
if (mWarning == null) {
- mWarning = AdtPlugin.getImageLoader().loadImage(IMG_WARNING, mDisplay);
+ mWarning = IconFactory.getInstance().getIcon(IMG_WARNING);
}
new Label(parent, SWT.NONE).setImage(mWarning);
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/.classpath b/eclipse/plugins/com.android.ide.eclipse.ddms/.classpath
index 280621c..9132c7b 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/.classpath
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/.classpath
@@ -6,5 +6,7 @@
<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-1.0.9-swt.jar"/>
+ <classpathentry kind="lib" path="libs/ddmlib.jar"/>
+ <classpathentry kind="lib" path="libs/ddmuilib.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
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 1dad84f..ef5493b 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
@@ -30,7 +30,9 @@ Export-Package: com.android.ddmlib,
com.android.ide.eclipse.ddms,
com.android.ide.eclipse.ddms.preferences,
com.android.ide.eclipse.ddms.views
-Bundle-ClassPath: libs/jcommon-1.0.12.jar,
+Bundle-ClassPath: .,
+ libs/ddmlib.jar,
+ libs/ddmuilib.jar,
+ libs/jcommon-1.0.12.jar,
libs/jfreechart-1.0.9.jar,
- libs/jfreechart-1.0.9-swt.jar,
- .
+ libs/jfreechart-1.0.9-swt.jar
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/build.properties b/eclipse/plugins/com.android.ide.eclipse.ddms/build.properties
index 1c4c896..4645d2d 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/build.properties
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/build.properties
@@ -3,8 +3,7 @@ output.. = bin/
bin.includes = META-INF/,\
icons/,\
plugin.xml,\
- ., \
- libs/jcommon-1.0.12.jar,\
- libs/jfreechart-1.0.9-swt.jar,\
- libs/jfreechart-1.0.9.jar
+ .,\
+ libs/
+bin.excludes = libs/.gitignore
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/icons/.gitignore b/eclipse/plugins/com.android.ide.eclipse.ddms/icons/.gitignore
deleted file mode 100644
index f432e88..0000000
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/icons/.gitignore
+++ /dev/null
@@ -1,31 +0,0 @@
-add.png
-backward.png
-clear.png
-d.png
-debug-attach.png
-debug-error.png
-debug-wait.png
-delete.png
-device.png
-down.png
-e.png
-edit.png
-empty.png
-emulator.png
-forward.png
-gc.png
-halt.png
-heap.png
-i.png
-importBug.png
-load.png
-pause.png
-play.png
-pull.png
-push.png
-save.png
-thread.png
-up.png
-v.png
-w.png
-warning.png
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/icons/capture.png b/eclipse/plugins/com.android.ide.eclipse.ddms/icons/capture.png
deleted file mode 100644
index d75e7a9..0000000
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/icons/capture.png
+++ /dev/null
Binary files differ
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml b/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml
index 2d077d0..d1b86b7 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml
@@ -89,8 +89,8 @@
<perspectiveExtension targetID="org.eclipse.debug.ui.DebugPerspective">
<perspectiveShortcut id="com.android.ide.eclipse.ddms.Perspective"/>
<view id="com.android.ide.eclipse.ddms.views.LogCatView"
- relative="org.eclipse.ui.views.ProblemView"
- relationship="stack" />
+ relative="org.eclipse.ui.views.ProblemView"
+ relationship="stack" />
</perspectiveExtension>
</extension>
<extension
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/.gitignore b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/.gitignore
deleted file mode 100644
index 76d9981..0000000
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-ddmlib
-ddmuilib
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java
index b59182b..f9b90a0 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/DdmsPlugin.java
@@ -80,9 +80,6 @@ public final class DdmsPlugin extends AbstractUIPlugin implements IDeviceChangeL
/** Console for DDMS log message */
private MessageConsole mDdmsConsole;
- /** Image loader object */
- private ImageLoader mLoader;
-
private IDevice mCurrentDevice;
private Client mCurrentClient;
private boolean mListeningToUiSelection = false;
@@ -195,9 +192,6 @@ public final class DdmsPlugin extends AbstractUIPlugin implements IDeviceChangeL
});
- // create the loader that's able to load the images
- mLoader = new ImageLoader(this);
-
// set the listener for the preference change
Preferences prefs = getPluginPreferences();
prefs.addPropertyChangeListener(new IPropertyChangeListener() {
@@ -277,14 +271,6 @@ public final class DdmsPlugin extends AbstractUIPlugin implements IDeviceChangeL
return sPlugin;
}
- /** Return the image loader for the plugin */
- public static ImageLoader getImageLoader() {
- if (sPlugin != null) {
- return sPlugin.mLoader;
- }
- return null;
- }
-
public static String getAdb() {
return sAdbLocation;
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/ImageLoader.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/ImageLoader.java
deleted file mode 100644
index a70405d..0000000
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/ImageLoader.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-package com.android.ide.eclipse.ddms;
-
-import com.android.ddmuilib.IImageLoader;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * Implementation of the IImageLoader interface for the eclipse plugin.
- */
-public class ImageLoader implements IImageLoader {
-
- private URL mBaseUrl;
-
- public ImageLoader(Plugin plugin) {
- mBaseUrl = plugin.getBundle().getEntry("/"); // $NON-NLS-1$
- }
-
- /**
- * default method. only need a filename. the 2 interface methods call this one.
- * @param filename the filename of the image to load. The filename is searched for under /icons.
- * @return
- */
- public ImageDescriptor loadDescriptor(String filename) {
- try {
- URL newUrl = new URL(mBaseUrl, "/icons/" + filename); // $NON-NLS-1$
- return ImageDescriptor.createFromURL(newUrl);
- } catch (MalformedURLException e) {
- // we'll just return null;
- }
- return null;
- }
-
- public ImageDescriptor loadDescriptor(String filename, Display display) {
- return loadDescriptor(filename);
- }
-
-
- public Image loadImage(String filename, Display display) {
- ImageDescriptor descriptor = loadDescriptor(filename);
- if (descriptor !=null) {
- return descriptor.createImage();
- }
- return null;
- }
-
-}
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java
index fc6156d..079feb7 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/DeviceView.java
@@ -29,6 +29,7 @@ import com.android.ddmlib.SyncService.SyncResult;
import com.android.ddmuilib.handler.BaseFileHandler;
import com.android.ddmuilib.handler.MethodProfilingHandler;
import com.android.ddmuilib.DevicePanel;
+import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.ScreenShotDialog;
import com.android.ddmuilib.DevicePanel.IUiSelectionListener;
import com.android.ide.eclipse.ddms.DdmsPlugin;
@@ -247,7 +248,9 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
public void createPartControl(Composite parent) {
mParentShell = parent.getShell();
- mDeviceList = new DevicePanel(DdmsPlugin.getImageLoader(), USE_SELECTED_DEBUG_PORT);
+ ImageLoader loader = ImageLoader.getDdmUiLibLoader();
+
+ mDeviceList = new DevicePanel(USE_SELECTED_DEBUG_PORT);
mDeviceList.createPanel(parent);
mDeviceList.addSelectionListener(this);
@@ -264,8 +267,7 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
}
};
mCaptureAction.setToolTipText("Screen Capture");
- mCaptureAction.setImageDescriptor(
- DdmsPlugin.getImageLoader().loadDescriptor("capture.png")); //$NON-NLS-1$
+ mCaptureAction.setImageDescriptor(loader.loadDescriptor("capture.png")); //$NON-NLS-1$
mResetAdbAction = new Action("Reset adb") {
@Override
@@ -302,8 +304,7 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
mKillAppAction.setText("Stop Process");
mKillAppAction.setToolTipText("Stop Process");
- mKillAppAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor(DevicePanel.ICON_HALT));
+ mKillAppAction.setImageDescriptor(loader.loadDescriptor(DevicePanel.ICON_HALT));
mGcAction = new Action() {
@Override
@@ -314,8 +315,7 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
mGcAction.setText("Cause GC");
mGcAction.setToolTipText("Cause GC");
- mGcAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor(DevicePanel.ICON_GC));
+ mGcAction.setImageDescriptor(loader.loadDescriptor(DevicePanel.ICON_GC));
mHprofAction = new Action() {
@Override
@@ -326,8 +326,7 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
};
mHprofAction.setText("Dump HPROF file");
mHprofAction.setToolTipText("Dump HPROF file");
- mHprofAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor(DevicePanel.ICON_HPROF));
+ mHprofAction.setImageDescriptor(loader.loadDescriptor(DevicePanel.ICON_HPROF));
mUpdateHeapAction = new Action("Update Heap", IAction.AS_CHECK_BOX) {
@Override
@@ -337,8 +336,7 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
}
};
mUpdateHeapAction.setToolTipText("Update Heap");
- mUpdateHeapAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor(DevicePanel.ICON_HEAP));
+ mUpdateHeapAction.setImageDescriptor(loader.loadDescriptor(DevicePanel.ICON_HEAP));
mUpdateThreadAction = new Action("Update Threads", IAction.AS_CHECK_BOX) {
@Override
@@ -348,8 +346,7 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
}
};
mUpdateThreadAction.setToolTipText("Update Threads");
- mUpdateThreadAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor(DevicePanel.ICON_THREAD));
+ mUpdateThreadAction.setImageDescriptor(loader.loadDescriptor(DevicePanel.ICON_THREAD));
mTracingAction = new Action() {
@Override
@@ -359,10 +356,8 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
};
mTracingAction.setText("Start Method Profiling");
mTracingAction.setToolTipText("Start Method Profiling");
- mTracingStartImage = DdmsPlugin.getImageLoader().loadDescriptor(
- DevicePanel.ICON_TRACING_START);
- mTracingStopImage = DdmsPlugin.getImageLoader().loadDescriptor(
- DevicePanel.ICON_TRACING_STOP);
+ mTracingStartImage = loader.loadDescriptor(DevicePanel.ICON_TRACING_START);
+ mTracingStopImage = loader.loadDescriptor(DevicePanel.ICON_TRACING_STOP);
mTracingAction.setImageDescriptor(mTracingStartImage);
// check if there's already a debug launcher set up in the plugin class
@@ -415,8 +410,7 @@ public class DeviceView extends ViewPart implements IUiSelectionListener, IClien
}
};
mDebugAction.setToolTipText("Debug the selected process, provided its source project is present and opened in the workspace.");
- mDebugAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor("debug-attach.png")); //$NON-NLS-1$
+ mDebugAction.setImageDescriptor(loader.loadDescriptor("debug-attach.png")); //$NON-NLS-1$
if (mDebugLauncher == null) {
mDebugAction.setEnabled(false);
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EmulatorControlView.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EmulatorControlView.java
index ca9a691..0dda7ef 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EmulatorControlView.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EmulatorControlView.java
@@ -17,7 +17,6 @@
package com.android.ide.eclipse.ddms.views;
import com.android.ddmuilib.EmulatorControlPanel;
-import com.android.ide.eclipse.ddms.DdmsPlugin;
import org.eclipse.swt.widgets.Composite;
@@ -30,7 +29,7 @@ public class EmulatorControlView extends SelectionDependentViewPart {
@Override
public void createPartControl(Composite parent) {
- mPanel = new EmulatorControlPanel(DdmsPlugin.getImageLoader());
+ mPanel = new EmulatorControlPanel();
mPanel.createPanel(parent);
setSelectionDependentPanel(mPanel);
}
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EventLogView.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EventLogView.java
index 3a74e42..03752c4 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EventLogView.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/EventLogView.java
@@ -16,10 +16,9 @@
package com.android.ide.eclipse.ddms.views;
+import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.log.event.EventLogPanel;
import com.android.ide.eclipse.ddms.CommonAction;
-import com.android.ide.eclipse.ddms.DdmsPlugin;
-import com.android.ide.eclipse.ddms.ImageLoader;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
@@ -29,42 +28,37 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IActionBars;
public class EventLogView extends SelectionDependentViewPart {
-
+
private EventLogPanel mLogPanel;
@Override
public void createPartControl(Composite parent) {
- ImageLoader loader = DdmsPlugin.getImageLoader();
+ ImageLoader loader = ImageLoader.getDdmUiLibLoader();
// create the external actions
CommonAction optionsAction = new CommonAction("Options...");
optionsAction.setToolTipText("Opens the options panel");
- optionsAction.setImageDescriptor(loader
- .loadDescriptor("edit.png")); // $NON-NLS-1$
+ optionsAction.setImageDescriptor(loader.loadDescriptor("edit.png")); // $NON-NLS-1$
CommonAction clearLogAction = new CommonAction("Clear Log");
clearLogAction.setToolTipText("Clears the event log");
- clearLogAction.setImageDescriptor(loader
- .loadDescriptor("clear.png")); // $NON-NLS-1$
+ clearLogAction.setImageDescriptor(loader.loadDescriptor("clear.png")); // $NON-NLS-1$
CommonAction saveAction = new CommonAction("Save Log");
saveAction.setToolTipText("Saves the event log");
- saveAction.setImageDescriptor(loader
- .loadDescriptor("save.png")); // $NON-NLS-1$
+ saveAction.setImageDescriptor(loader.loadDescriptor("save.png")); // $NON-NLS-1$
CommonAction loadAction = new CommonAction("Load Log");
loadAction.setToolTipText("Loads an event log");
- loadAction.setImageDescriptor(loader
- .loadDescriptor("load.png")); // $NON-NLS-1$
+ loadAction.setImageDescriptor(loader.loadDescriptor("load.png")); // $NON-NLS-1$
CommonAction importBugAction = new CommonAction("Import Bug Report Log");
importBugAction.setToolTipText("Imports a bug report.");
- importBugAction.setImageDescriptor(loader
- .loadDescriptor("importBug.png")); // $NON-NLS-1$
+ importBugAction.setImageDescriptor(loader.loadDescriptor("importBug.png")); // $NON-NLS-1$
placeActions(optionsAction, clearLogAction, saveAction, loadAction, importBugAction);
- mLogPanel = new EventLogPanel(DdmsPlugin.getImageLoader());
+ mLogPanel = new EventLogPanel();
mLogPanel.setActions(optionsAction, clearLogAction, saveAction, loadAction, importBugAction);
mLogPanel.createPanel(parent);
setSelectionDependentPanel(mLogPanel);
@@ -74,17 +68,17 @@ public class EventLogView extends SelectionDependentViewPart {
public void setFocus() {
mLogPanel.setFocus();
}
-
+
@Override
public void dispose() {
if (mLogPanel != null) {
mLogPanel.stopEventLog(true);
}
}
-
+
/**
* Places the actions in the toolbar and in the menu.
- * @param importBugAction
+ * @param importBugAction
*/
private void placeActions(IAction optionAction, IAction clearAction, IAction saveAction,
IAction loadAction, CommonAction importBugAction) {
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/FileExplorerView.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/FileExplorerView.java
index e79010c..b3e08a2 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/FileExplorerView.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/FileExplorerView.java
@@ -18,6 +18,7 @@ package com.android.ide.eclipse.ddms.views;
import com.android.ddmlib.Client;
import com.android.ddmlib.IDevice;
+import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.explorer.DeviceExplorer;
import com.android.ide.eclipse.ddms.CommonAction;
import com.android.ide.eclipse.ddms.DdmsPlugin;
@@ -58,6 +59,8 @@ public class FileExplorerView extends ViewPart implements ISelectionListener {
@Override
public void createPartControl(Composite parent) {
+ ImageLoader loader = ImageLoader.getDdmUiLibLoader();
+
DeviceExplorer.COLUMN_NAME = COLUMN_NAME;
DeviceExplorer.COLUMN_SIZE = COLUMN_SIZE;
DeviceExplorer.COLUMN_DATE = COLUMN_DATE;
@@ -69,14 +72,12 @@ public class FileExplorerView extends ViewPart implements ISelectionListener {
mExplorer = new DeviceExplorer();
- mExplorer.setImages(PlatformUI.getWorkbench()
- .getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE),
- PlatformUI.getWorkbench() .getSharedImages().getImage(
- ISharedImages.IMG_OBJ_FOLDER),
- DdmsPlugin.getImageLoader().loadDescriptor("android.png") //$NON-NLS-1$
- .createImage(),
- PlatformUI.getWorkbench() .getSharedImages().getImage(
- ISharedImages.IMG_OBJ_ELEMENT));
+ mExplorer.setCustomImages(
+ PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE),
+ PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER),
+ null /*apk image*/,
+ PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT)
+ );
// creates the actions
CommonAction pushAction = new CommonAction("Push File...") {
@@ -86,8 +87,7 @@ public class FileExplorerView extends ViewPart implements ISelectionListener {
}
};
pushAction.setToolTipText("Push a file onto the device");
- pushAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor("push.png")); //$NON-NLS-1$
+ pushAction.setImageDescriptor(loader.loadDescriptor("push.png")); //$NON-NLS-1$
pushAction.setEnabled(false);
CommonAction pullAction = new CommonAction("Pull File...") {
@@ -97,8 +97,7 @@ public class FileExplorerView extends ViewPart implements ISelectionListener {
}
};
pullAction.setToolTipText("Pull a file from the device");
- pullAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor("pull.png")); //$NON-NLS-1$
+ pullAction.setImageDescriptor(loader.loadDescriptor("pull.png")); //$NON-NLS-1$
pullAction.setEnabled(false);
CommonAction deleteAction = new CommonAction("Delete") {
@@ -108,8 +107,7 @@ public class FileExplorerView extends ViewPart implements ISelectionListener {
}
};
deleteAction.setToolTipText("Delete the selection");
- deleteAction.setImageDescriptor(DdmsPlugin.getImageLoader()
- .loadDescriptor("delete.png")); //$NON-NLS-1$
+ deleteAction.setImageDescriptor(loader.loadDescriptor("delete.png")); //$NON-NLS-1$
deleteAction.setEnabled(false);
// set up the actions in the explorer
diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/LogCatView.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/LogCatView.java
index 46d8b24..af3d46f 100644
--- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/LogCatView.java
+++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/LogCatView.java
@@ -17,13 +17,13 @@
package com.android.ide.eclipse.ddms.views;
import com.android.ddmlib.Log.LogLevel;
+import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.logcat.LogColors;
import com.android.ddmuilib.logcat.LogFilter;
import com.android.ddmuilib.logcat.LogPanel;
import com.android.ddmuilib.logcat.LogPanel.ILogFilterStorageManager;
import com.android.ide.eclipse.ddms.CommonAction;
import com.android.ide.eclipse.ddms.DdmsPlugin;
-import com.android.ide.eclipse.ddms.ImageLoader;
import com.android.ide.eclipse.ddms.preferences.PreferenceInitializer;
import org.eclipse.core.resources.IFile;
@@ -182,7 +182,7 @@ public final class LogCatView extends SelectionDependentViewPart {
Display d = parent.getDisplay();
LogColors colors = new LogColors();
- ImageLoader loader = DdmsPlugin.getImageLoader();
+ ImageLoader loader = ImageLoader.getDdmUiLibLoader();
colors.infoColor = new Color(d, 0, 127, 0);
colors.debugColor = new Color(d, 0, 0, 127);
@@ -197,8 +197,7 @@ public final class LogCatView extends SelectionDependentViewPart {
}
};
mCreateFilterAction.setToolTipText("Create Filter");
- mCreateFilterAction.setImageDescriptor(loader
- .loadDescriptor("add.png")); // $NON-NLS-1$
+ mCreateFilterAction.setImageDescriptor(loader.loadDescriptor("add.png"));
mEditFilterAction = new CommonAction("Edit Filter") {
@Override
@@ -207,8 +206,7 @@ public final class LogCatView extends SelectionDependentViewPart {
}
};
mEditFilterAction.setToolTipText("Edit Filter");
- mEditFilterAction.setImageDescriptor(loader
- .loadDescriptor("edit.png")); // $NON-NLS-1$
+ mEditFilterAction.setImageDescriptor(loader.loadDescriptor("edit.png")); // $NON-NLS-1$
mDeleteFilterAction = new CommonAction("Delete Filter") {
@Override
@@ -217,8 +215,7 @@ public final class LogCatView extends SelectionDependentViewPart {
}
};
mDeleteFilterAction.setToolTipText("Delete Filter");
- mDeleteFilterAction.setImageDescriptor(loader
- .loadDescriptor("delete.png")); // $NON-NLS-1$
+ mDeleteFilterAction.setImageDescriptor(loader.loadDescriptor("delete.png")); // $NON-NLS-1$
mExportAction = new CommonAction("Export Selection As Text...") {
@Override
@@ -268,12 +265,11 @@ public final class LogCatView extends SelectionDependentViewPart {
mLogPanel.clear();
}
};
- mClearAction.setImageDescriptor(loader
- .loadDescriptor("clear.png")); // $NON-NLS-1$
+ mClearAction.setImageDescriptor(loader.loadDescriptor("clear.png")); // $NON-NLS-1$
// now create the log view
- mLogPanel = new LogPanel(loader, colors, new FilterStorage(), LogPanel.FILTER_MANUAL);
+ mLogPanel = new LogPanel(colors, new FilterStorage(), LogPanel.FILTER_MANUAL);
mLogPanel.setActions(mDeleteFilterAction, mEditFilterAction, mLogLevelActions);
// get the font
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/.classpath b/eclipse/plugins/com.android.ide.eclipse.tests/.classpath
index 660adf3..809717c 100644
--- a/eclipse/plugins/com.android.ide.eclipse.tests/.classpath
+++ b/eclipse/plugins/com.android.ide.eclipse.tests/.classpath
@@ -4,12 +4,14 @@
<classpathentry kind="src" path="unittests"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="lib" path="/adt/sdklib.jar" sourcepath="/SdkLib"/>
- <classpathentry kind="lib" path="/adt/sdkuilib.jar" sourcepath="/SdkUiLib"/>
- <classpathentry kind="lib" path="/adt/layoutlib_api.jar" sourcepath="/layoutlib_api"/>
- <classpathentry kind="lib" path="/adt/ninepatch.jar"/>
<classpathentry kind="lib" path="layoutlib.jar"/>
<classpathentry kind="lib" path="kxml2-2.3.0.jar"/>
<classpathentry kind="lib" path="groovy-all-1.7.0.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ddmlib"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ddmuilib"/>
+ <classpathentry kind="lib" path="/adt/libs/layoutlib_api.jar" sourcepath="/layoutlib_api"/>
+ <classpathentry kind="lib" path="/adt/libs/ninepatch.jar"/>
+ <classpathentry kind="lib" path="/adt/libs/sdklib.jar" sourcepath="/SdkLib"/>
+ <classpathentry kind="lib" path="/adt/libs/sdkuilib.jar" sourcepath="/SdkUiLib"/>
<classpathentry kind="output" path="bin"/>
</classpath>