aboutsummaryrefslogtreecommitdiffstats
path: root/ddms/libs
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-12-20 20:20:24 -0800
committerTor Norbye <tnorbye@google.com>2011-12-21 13:36:23 -0800
commitab36f4e7488358dea4ab6b54ee2b7bef3da0232b (patch)
treee6846336e35cd0fb29addf962c9031c68492ed30 /ddms/libs
parent4ae7075d188a35298d834bfcd0500b77b08a12ab (diff)
downloadsdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.zip
sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.tar.gz
sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.tar.bz2
Update SDK codebase to JDK 6
This changeset makes the SDK codebase compile with source=1.6 (which means it also requires JDK 6). This means that methods implementing an interface requires @Override's. It also means we can start using APIs like the ArrayDeque class and methods like String#isEmpty(). This changeset looks big but the change is trivial: it's basically adding @Override in all the places that need it, along with some other automatic Eclipse cleanup in certain files (such as reordering imports where they were incorrectly ordered (because older versions of Eclipse didn't always handle inner classes right)), as well as cleaning up trailing whitespace and removing some $NON-NLS-1$ markers on lines where there aren't any string literals anymore. This changeset also sets the source and target JDK level to 6 in the Eclipse compiler .settings file, and synchronizes this file to all the other Eclipse SDK projects. Change-Id: I6a9585aa44c3dee9a5c00739ab22fbdbcb9f8275
Diffstat (limited to 'ddms/libs')
-rw-r--r--ddms/libs/ddmlib/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java2
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java3
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/Device.java39
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java1
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java7
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java13
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java14
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java2
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java3
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java5
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java5
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java3
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java1
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java20
-rw-r--r--ddms/libs/ddmuilib/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/AllocationPanel.java19
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/DevicePanel.java29
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/EmulatorControlPanel.java19
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/HeapPanel.java10
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/InfoPanel.java4
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/NativeHeapPanel.java8
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/StackTracePanel.java52
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressHelper.java3
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressMonitor.java5
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/SysinfoPanel.java4
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/TableHelper.java6
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java4
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/ThreadPanel.java64
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/actions/ToolItemAction.java3
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceContentProvider.java10
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceExplorer.java20
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/FileLabelProvider.java8
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/BaseFileHandler.java9
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/MethodProfilingHandler.java7
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapDataImporter.java1
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapLabelProvider.java2
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapPanel.java20
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByAllocations.java5
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByLibrary.java5
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeLibraryAllocationInfo.java1
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackContentProvider.java6
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackLabelProvider.java2
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeSymbolResolverTask.java1
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/location/CoordinateControls.java2
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackContentProvider.java5
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackLabelProvider.java6
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointContentProvider.java5
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointLabelProvider.java6
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplayLog.java6
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplay.java3
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplayOptions.java8
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventLogPanel.java13
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventValueSelector.java102
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/EditFilterDialog.java4
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterContentProvider.java3
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterLabelProvider.java2
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterSettingsDialog.java1
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageContentProvider.java3
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java16
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPidToNameMapper.java8
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiver.java3
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiverFactory.java3
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java19
64 files changed, 542 insertions, 145 deletions
diff --git a/ddms/libs/ddmlib/.settings/org.eclipse.jdt.core.prefs b/ddms/libs/ddmlib/.settings/org.eclipse.jdt.core.prefs
index e755df2..9c7cb00 100644
--- a/ddms/libs/ddmlib/.settings/org.eclipse.jdt.core.prefs
+++ b/ddms/libs/ddmlib/.settings/org.eclipse.jdt.core.prefs
@@ -1,6 +1,14 @@
-#Thu Jun 09 12:26:44 PDT 2011
+#Tue Dec 20 16:31:10 PST 2011
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -9,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -69,3 +78,4 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java b/ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java
index 90bd7d4..a68962f 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java
@@ -56,6 +56,7 @@ public class AllocationInfo implements IStackTraceInfo {
return mDescending;
}
+ @Override
public int compare(AllocationInfo o1, AllocationInfo o2) {
int diff = 0;
switch (mSortMode) {
@@ -159,6 +160,7 @@ public class AllocationInfo implements IStackTraceInfo {
* (non-Javadoc)
* @see com.android.ddmlib.IStackTraceInfo#getStackTrace()
*/
+ @Override
public StackTraceElement[] getStackTrace() {
return mStackTrace;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java b/ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java
index 63f7292..cb4612f 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java
@@ -34,6 +34,7 @@ public class CollectingOutputReceiver implements IShellOutputReceiver {
/**
* {@inheritDoc}
*/
+ @Override
public boolean isCancelled() {
return mIsCanceled;
}
@@ -48,6 +49,7 @@ public class CollectingOutputReceiver implements IShellOutputReceiver {
/**
* {@inheritDoc}
*/
+ @Override
public void addOutput(byte[] data, int offset, int length) {
if (!isCancelled()) {
String s = null;
@@ -64,6 +66,7 @@ public class CollectingOutputReceiver implements IShellOutputReceiver {
/**
* {@inheritDoc}
*/
+ @Override
public void flush() {
// ignore
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java b/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java
index 5a3cfd1..f3931a1 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java
@@ -98,6 +98,7 @@ final class Device implements IDevice {
}
}
+ @Override
public boolean isCancelled() {
return false;
}
@@ -152,6 +153,7 @@ final class Device implements IDevice {
}
}
+ @Override
public boolean isCancelled() {
return false;
}
@@ -161,11 +163,13 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getSerialNumber()
*/
+ @Override
public String getSerialNumber() {
return mSerialNumber;
}
/** {@inheritDoc} */
+ @Override
public String getAvdName() {
return mAvdName;
}
@@ -186,6 +190,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getState()
*/
+ @Override
public DeviceState getState() {
return mState;
}
@@ -202,6 +207,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getProperties()
*/
+ @Override
public Map<String, String> getProperties() {
return Collections.unmodifiableMap(mProperties);
}
@@ -210,6 +216,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getPropertyCount()
*/
+ @Override
public int getPropertyCount() {
return mProperties.size();
}
@@ -218,6 +225,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getProperty(java.lang.String)
*/
+ @Override
public String getProperty(String name) {
return mProperties.get(name);
}
@@ -225,6 +233,7 @@ final class Device implements IDevice {
/**
* {@inheritDoc}
*/
+ @Override
public boolean arePropertiesSet() {
return mArePropertiesSet;
}
@@ -232,6 +241,7 @@ final class Device implements IDevice {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyCacheOrSync(String name) throws TimeoutException,
AdbCommandRejectedException, ShellCommandUnresponsiveException, IOException {
if (mArePropertiesSet) {
@@ -244,6 +254,7 @@ final class Device implements IDevice {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertySync(String name) throws TimeoutException,
AdbCommandRejectedException, ShellCommandUnresponsiveException, IOException {
CollectingOutputReceiver receiver = new CollectingOutputReceiver();
@@ -255,6 +266,7 @@ final class Device implements IDevice {
return value;
}
+ @Override
public String getMountPoint(String name) {
return mMountPoints.get(name);
}
@@ -269,6 +281,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#isOnline()
*/
+ @Override
public boolean isOnline() {
return mState == DeviceState.ONLINE;
}
@@ -277,6 +290,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#isEmulator()
*/
+ @Override
public boolean isEmulator() {
return mSerialNumber.matches(RE_EMULATOR_SN);
}
@@ -285,6 +299,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#isOffline()
*/
+ @Override
public boolean isOffline() {
return mState == DeviceState.OFFLINE;
}
@@ -293,6 +308,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#isBootLoader()
*/
+ @Override
public boolean isBootLoader() {
return mState == DeviceState.BOOTLOADER;
}
@@ -301,6 +317,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#hasClients()
*/
+ @Override
public boolean hasClients() {
return mClients.size() > 0;
}
@@ -309,6 +326,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getClients()
*/
+ @Override
public Client[] getClients() {
synchronized (mClients) {
return mClients.toArray(new Client[mClients.size()]);
@@ -319,6 +337,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getClient(java.lang.String)
*/
+ @Override
public Client getClient(String applicationName) {
synchronized (mClients) {
for (Client c : mClients) {
@@ -336,6 +355,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getSyncService()
*/
+ @Override
public SyncService getSyncService()
throws TimeoutException, AdbCommandRejectedException, IOException {
SyncService syncService = new SyncService(AndroidDebugBridge.getSocketAddress(), this);
@@ -350,15 +370,18 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getFileListingService()
*/
+ @Override
public FileListingService getFileListingService() {
return new FileListingService(this);
}
+ @Override
public RawImage getScreenshot()
throws TimeoutException, AdbCommandRejectedException, IOException {
return AdbHelper.getFrameBuffer(AndroidDebugBridge.getSocketAddress(), this);
}
+ @Override
public void executeShellCommand(String command, IShellOutputReceiver receiver)
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
IOException {
@@ -366,6 +389,7 @@ final class Device implements IDevice {
receiver, DdmPreferences.getTimeOut());
}
+ @Override
public void executeShellCommand(String command, IShellOutputReceiver receiver,
int maxTimeToOutputResponse)
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
@@ -374,21 +398,25 @@ final class Device implements IDevice {
receiver, maxTimeToOutputResponse);
}
+ @Override
public void runEventLogService(LogReceiver receiver)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.runEventLogService(AndroidDebugBridge.getSocketAddress(), this, receiver);
}
+ @Override
public void runLogService(String logname, LogReceiver receiver)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.runLogService(AndroidDebugBridge.getSocketAddress(), this, logname, receiver);
}
+ @Override
public void createForward(int localPort, int remotePort)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.createForward(AndroidDebugBridge.getSocketAddress(), this, localPort, remotePort);
}
+ @Override
public void removeForward(int localPort, int remotePort)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.removeForward(AndroidDebugBridge.getSocketAddress(), this, localPort, remotePort);
@@ -398,6 +426,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getClientName(int)
*/
+ @Override
public String getClientName(int pid) {
synchronized (mClients) {
for (Client c : mClients) {
@@ -498,6 +527,7 @@ final class Device implements IDevice {
mMountPoints.put(name, value);
}
+ @Override
public void pushFile(String local, String remote)
throws IOException, AdbCommandRejectedException, TimeoutException, SyncException {
SyncService sync = null;
@@ -535,6 +565,7 @@ final class Device implements IDevice {
}
}
+ @Override
public void pullFile(String remote, String local)
throws IOException, AdbCommandRejectedException, TimeoutException, SyncException {
SyncService sync = null;
@@ -572,6 +603,7 @@ final class Device implements IDevice {
}
}
+ @Override
public String installPackage(String packageFilePath, boolean reinstall, String... extraArgs)
throws InstallException {
try {
@@ -590,6 +622,7 @@ final class Device implements IDevice {
}
}
+ @Override
public String syncPackageToDevice(String localFilePath)
throws IOException, AdbCommandRejectedException, TimeoutException, SyncException {
SyncService sync = null;
@@ -638,6 +671,7 @@ final class Device implements IDevice {
return new File(filePath).getName();
}
+ @Override
public String installRemotePackage(String remoteFilePath, boolean reinstall,
String... extraArgs) throws InstallException {
try {
@@ -665,6 +699,7 @@ final class Device implements IDevice {
}
}
+ @Override
public void removeRemotePackage(String remoteFilePath) throws InstallException {
try {
executeShellCommand("rm " + remoteFilePath, new NullOutputReceiver(), INSTALL_TIMEOUT);
@@ -679,6 +714,7 @@ final class Device implements IDevice {
}
}
+ @Override
public String uninstallPackage(String packageName) throws InstallException {
try {
InstallReceiver receiver = new InstallReceiver();
@@ -699,17 +735,20 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#reboot()
*/
+ @Override
public void reboot(String into)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.reboot(into, AndroidDebugBridge.getSocketAddress(), this);
}
+ @Override
public Integer getBatteryLevel() throws TimeoutException, AdbCommandRejectedException,
IOException, ShellCommandUnresponsiveException {
// use default of 5 minutes
return getBatteryLevel(5 * 60 * 1000);
}
+ @Override
public Integer getBatteryLevel(long freshnessMs) throws TimeoutException,
AdbCommandRejectedException, IOException, ShellCommandUnresponsiveException {
if (mLastBatteryLevel != null
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java b/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java
index e039cda..8f1bd87 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java
@@ -486,6 +486,7 @@ final class DeviceMonitor {
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
IOException {
device.executeShellCommand("echo $" + name, new MultiLineReceiver() { //$NON-NLS-1$
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java b/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java
index 15a9fd2..5d569a2 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java
@@ -116,10 +116,11 @@ public final class FileListingService {
* Comparator object for FileEntry
*/
private static Comparator<FileEntry> sEntryComparator = new Comparator<FileEntry>() {
+ @Override
public int compare(FileEntry o1, FileEntry o2) {
if (o1 instanceof FileEntry && o2 instanceof FileEntry) {
- FileEntry fe1 = (FileEntry)o1;
- FileEntry fe2 = (FileEntry)o2;
+ FileEntry fe1 = o1;
+ FileEntry fe2 = o2;
return fe1.name.compareTo(fe2.name);
}
return 0;
@@ -569,6 +570,7 @@ public final class FileListingService {
return null;
}
+ @Override
public boolean isCancelled() {
return false;
}
@@ -696,6 +698,7 @@ public final class FileListingService {
}
}
}
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java b/ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java
index 9293379..2033f04 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java
@@ -20,12 +20,12 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
- * A receiver able to parse the result of the execution of
+ * A receiver able to parse the result of the execution of
* {@link #GETPROP_COMMAND} on a device.
*/
final class GetPropReceiver extends MultiLineReceiver {
final static String GETPROP_COMMAND = "getprop"; //$NON-NLS-1$
-
+
private final static Pattern GETPROP_PATTERN = Pattern.compile("^\\[([^]]+)\\]\\:\\s*\\[(.*)\\]$"); //$NON-NLS-1$
/** indicates if we need to read the first */
@@ -50,23 +50,24 @@ final class GetPropReceiver extends MultiLineReceiver {
if (line.length() == 0 || line.startsWith("#")) {
continue;
}
-
+
Matcher m = GETPROP_PATTERN.matcher(line);
if (m.matches()) {
String label = m.group(1);
String value = m.group(2);
-
+
if (label.length() > 0) {
mDevice.addProperty(label, value);
}
}
}
}
-
+
+ @Override
public boolean isCancelled() {
return false;
}
-
+
@Override
public void done() {
mDevice.update(Device.CHANGE_BUILD_INFO);
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java b/ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java
index 6a62e60..42f740c 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java
@@ -162,20 +162,20 @@ public final class HeapSegment implements Comparable<HeapSegment> {
* so that they can be examined independently.
*/
ByteBuffer data = hs.mUsageData;
- int eState = (int)data.get() & 0x000000ff;
- int eLen = ((int)data.get() & 0x000000ff) + 1;
+ int eState = data.get() & 0x000000ff;
+ int eLen = (data.get() & 0x000000ff) + 1;
while ((eState & PARTIAL_MASK) != 0) {
/* If the partial bit was set, the next byte should describe
* the same object as the current one.
*/
- int nextState = (int)data.get() & 0x000000ff;
+ int nextState = data.get() & 0x000000ff;
if ((nextState & ~PARTIAL_MASK) != (eState & ~PARTIAL_MASK)) {
throw new ParseException("State mismatch", data.position());
}
eState = nextState;
- eLen += ((int)data.get() & 0x000000ff) + 1;
+ eLen += (data.get() & 0x000000ff) + 1;
}
setSolidity(eState & 0x7);
@@ -209,6 +209,7 @@ public final class HeapSegment implements Comparable<HeapSegment> {
this.mLength = length;
}
+ @Override
public int compareTo(HeapSegmentElement other) {
if (mLength != other.mLength) {
return mLength < other.mLength ? -1 : 1;
@@ -253,8 +254,8 @@ public final class HeapSegment implements Comparable<HeapSegment> {
*/
hpsgData.order(ByteOrder.BIG_ENDIAN);
mHeapId = hpsgData.getInt();
- mAllocationUnitSize = (int) hpsgData.get();
- mStartAddress = (long) hpsgData.getInt() & 0x00000000ffffffffL;
+ mAllocationUnitSize = hpsgData.get();
+ mStartAddress = hpsgData.getInt() & 0x00000000ffffffffL;
mOffset = hpsgData.getInt();
mAllocationUnitCount = hpsgData.getInt();
@@ -411,6 +412,7 @@ public final class HeapSegment implements Comparable<HeapSegment> {
return str.toString();
}
+ @Override
public int compareTo(HeapSegment other) {
if (mHeapId != other.mHeapId) {
return mHeapId < other.mHeapId ? -1 : 1;
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java b/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java
index f3d9412..ac1fa91 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java
@@ -47,6 +47,7 @@ public abstract class MultiLineReceiver implements IShellOutputReceiver {
* @see com.android.ddmlib.adb.IShellOutputReceiver#addOutput(
* byte[], int, int)
*/
+ @Override
public final void addOutput(byte[] data, int offset, int length) {
if (isCancelled() == false) {
String s = null;
@@ -105,6 +106,7 @@ public abstract class MultiLineReceiver implements IShellOutputReceiver {
/* (non-Javadoc)
* @see com.android.ddmlib.adb.IShellOutputReceiver#flush()
*/
+ @Override
public final void flush() {
if (mUnfinishedLine != null) {
processNewLines(new String[] { mUnfinishedLine });
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java b/ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java
index d2b5a1e..a963a64 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java
@@ -31,18 +31,21 @@ public final class NullOutputReceiver implements IShellOutputReceiver {
/* (non-Javadoc)
* @see com.android.ddmlib.adb.IShellOutputReceiver#addOutput(byte[], int, int)
*/
+ @Override
public void addOutput(byte[] data, int offset, int length) {
}
/* (non-Javadoc)
* @see com.android.ddmlib.adb.IShellOutputReceiver#flush()
*/
+ @Override
public void flush() {
}
/* (non-Javadoc)
* @see com.android.ddmlib.adb.IShellOutputReceiver#isCancelled()
*/
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java b/ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java
index 6a94d22..bf0b4e1 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java
@@ -113,16 +113,21 @@ public final class SyncService {
* A Sync progress monitor that does nothing
*/
private static class NullSyncProgresMonitor implements ISyncProgressMonitor {
+ @Override
public void advance(int work) {
}
+ @Override
public boolean isCanceled() {
return false;
}
+ @Override
public void start(int totalWork) {
}
+ @Override
public void startSubTask(String name) {
}
+ @Override
public void stop() {
}
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java b/ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java
index 8f284f3..93db931 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java
@@ -57,7 +57,7 @@ public final class ThreadInfo implements IStackTraceInfo {
mStime = stime;
mIsDaemon = isDaemon;
}
-
+
/**
* Sets the stack call of the thread.
* @param trace stackcall information.
@@ -80,7 +80,7 @@ public final class ThreadInfo implements IStackTraceInfo {
public String getThreadName() {
return mThreadName;
}
-
+
void setThreadName(String name) {
mThreadName = name;
}
@@ -124,6 +124,7 @@ public final class ThreadInfo implements IStackTraceInfo {
* (non-Javadoc)
* @see com.android.ddmlib.IStackTraceInfo#getStackTrace()
*/
+ @Override
public StackTraceElement[] getStackTrace() {
return mTrace;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java b/ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java
index 31f265f..22c0703 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java
@@ -33,9 +33,9 @@ import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
-import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -93,6 +93,7 @@ public final class EventLogParser {
processTagLine(line);
}
}
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java
index cbb1c5a..204e07a 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java
@@ -419,6 +419,7 @@ public class InstrumentationResultParser extends MultiLineReceiver {
*
* @see IShellOutputReceiver#isCancelled()
*/
+ @Override
public boolean isCancelled() {
return mIsCancelled;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java
index b8cd154..124df7d 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java
@@ -17,9 +17,9 @@
package com.android.ddmlib.testrunner;
+import com.android.ddmlib.AdbCommandRejectedException;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.Log;
-import com.android.ddmlib.AdbCommandRejectedException;
import com.android.ddmlib.ShellCommandUnresponsiveException;
import com.android.ddmlib.TimeoutException;
@@ -93,6 +93,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public String getPackageName() {
return mPackageName;
}
@@ -100,6 +101,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public String getRunnerName() {
if (mRunnerName == null) {
return DEFAULT_RUNNER_NAME;
@@ -117,6 +119,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setClassName(String className) {
addInstrumentationArg(CLASS_ARG_NAME, className);
}
@@ -124,6 +127,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setClassNames(String[] classNames) {
StringBuilder classArgBuilder = new StringBuilder();
@@ -139,6 +143,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setMethodName(String className, String testName) {
setClassName(className + METHOD_SEPARATOR + testName);
}
@@ -146,6 +151,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setTestPackageName(String packageName) {
addInstrumentationArg(PACKAGE_ARG_NAME, packageName);
}
@@ -153,6 +159,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void addInstrumentationArg(String name, String value) {
if (name == null || value == null) {
throw new IllegalArgumentException("name or value arguments cannot be null");
@@ -163,6 +170,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void removeInstrumentationArg(String name) {
if (name == null) {
throw new IllegalArgumentException("name argument cannot be null");
@@ -173,6 +181,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void addBooleanArg(String name, boolean value) {
addInstrumentationArg(name, Boolean.toString(value));
}
@@ -180,6 +189,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setLogOnly(boolean logOnly) {
addBooleanArg(LOG_ARG_NAME, logOnly);
}
@@ -187,6 +197,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setDebug(boolean debug) {
addBooleanArg(DEBUG_ARG_NAME, debug);
}
@@ -194,6 +205,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setCoverage(boolean coverage) {
addBooleanArg(COVERAGE_ARG_NAME, coverage);
}
@@ -201,6 +213,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setTestSize(TestSize size) {
addInstrumentationArg(SIZE_ARG_NAME, size.getRunnerValue());
}
@@ -208,6 +221,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setMaxtimeToOutputResponse(int maxTimeToOutputResponse) {
mMaxTimeToOutputResponse = maxTimeToOutputResponse;
}
@@ -215,6 +229,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setRunName(String runName) {
mRunName = runName;
}
@@ -222,6 +237,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void run(ITestRunListener... listeners)
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
IOException {
@@ -231,6 +247,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void run(Collection<ITestRunListener> listeners)
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
IOException {
@@ -276,6 +293,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void cancel() {
if (mParser != null) {
mParser.cancel();
diff --git a/ddms/libs/ddmuilib/.settings/org.eclipse.jdt.core.prefs b/ddms/libs/ddmuilib/.settings/org.eclipse.jdt.core.prefs
index e755df2..9c7cb00 100644
--- a/ddms/libs/ddmuilib/.settings/org.eclipse.jdt.core.prefs
+++ b/ddms/libs/ddmuilib/.settings/org.eclipse.jdt.core.prefs
@@ -1,6 +1,14 @@
-#Thu Jun 09 12:26:44 PDT 2011
+#Tue Dec 20 16:31:10 PST 2011
eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
@@ -9,6 +17,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -69,3 +78,4 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/AllocationPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/AllocationPanel.java
index e28b37e..3214da2 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/AllocationPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/AllocationPanel.java
@@ -17,10 +17,10 @@
package com.android.ddmuilib;
import com.android.ddmlib.AllocationInfo;
-import com.android.ddmlib.Client;
import com.android.ddmlib.AllocationInfo.AllocationSorter;
import com.android.ddmlib.AllocationInfo.SortMode;
import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
+import com.android.ddmlib.Client;
import com.android.ddmlib.ClientData.AllocationTrackingStatus;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -48,11 +48,11 @@ import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.eclipse.swt.widgets.Table;
@@ -104,6 +104,7 @@ public class AllocationPanel extends TablePanel {
* {@link AllocationInfo}.
*/
private class AllocationContentProvider implements IStructuredContentProvider {
+ @Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof Client) {
AllocationInfo[] allocs = ((Client)inputElement).getClientData().getAllocations();
@@ -119,10 +120,12 @@ public class AllocationPanel extends TablePanel {
return new Object[0];
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// pass
}
@@ -134,10 +137,12 @@ public class AllocationPanel extends TablePanel {
*/
private static class AllocationLabelProvider implements ITableLabelProvider {
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
if (element instanceof AllocationInfo) {
AllocationInfo alloc = (AllocationInfo)element;
@@ -160,19 +165,23 @@ public class AllocationPanel extends TablePanel {
return null;
}
+ @Override
public void addListener(ILabelProviderListener listener) {
// pass
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public boolean isLabelProperty(Object element, String property) {
// pass
return false;
}
+ @Override
public void removeListener(ILabelProviderListener listener) {
// pass
}
@@ -237,6 +246,7 @@ public class AllocationPanel extends TablePanel {
gridData.widthHint = 200;
filterText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent arg0) {
mFilterText = filterText.getText().trim();
mAllocationViewer.refresh();
@@ -362,6 +372,7 @@ public class AllocationPanel extends TablePanel {
mAllocationViewer.setLabelProvider(new AllocationLabelProvider());
mAllocationViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
AllocationInfo selectedAlloc = getAllocationSelection(event.getSelection());
updateAllocationStackTrace(selectedAlloc);
@@ -411,6 +422,7 @@ public class AllocationPanel extends TablePanel {
// allow resizes, but cap at minPanelWidth
sash.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
Rectangle sashRect = sash.getBounds();
Rectangle panelRect = mAllocationBase.getClientArea();
@@ -455,11 +467,13 @@ public class AllocationPanel extends TablePanel {
*
* @see IClientChangeListener#clientChanged(Client, int)
*/
+ @Override
public void clientChanged(final Client client, int changeMask) {
if (client == getCurrentClient()) {
if ((changeMask & Client.CHANGE_HEAP_ALLOCATIONS) != 0) {
try {
mAllocationTable.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
mAllocationViewer.refresh();
updateAllocationStackCall();
@@ -471,6 +485,7 @@ public class AllocationPanel extends TablePanel {
} else if ((changeMask & Client.CHANGE_HEAP_ALLOCATION_STATUS) != 0) {
try {
mAllocationTable.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
setUpButtons(true, client.getClientData().getAllocationStatus());
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/DevicePanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/DevicePanel.java
index dc391a6..68f23b7 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/DevicePanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/DevicePanel.java
@@ -17,14 +17,14 @@
package com.android.ddmuilib;
import com.android.ddmlib.AndroidDebugBridge;
-import com.android.ddmlib.Client;
-import com.android.ddmlib.ClientData;
-import com.android.ddmlib.DdmPreferences;
-import com.android.ddmlib.IDevice;
import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
import com.android.ddmlib.AndroidDebugBridge.IDebugBridgeChangeListener;
import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener;
+import com.android.ddmlib.Client;
+import com.android.ddmlib.ClientData;
import com.android.ddmlib.ClientData.DebuggerStatus;
+import com.android.ddmlib.DdmPreferences;
+import com.android.ddmlib.IDevice;
import com.android.ddmlib.IDevice.DeviceState;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -108,6 +108,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
* and second level elements are {@link Client} object.
*/
private class ContentProvider implements ITreeContentProvider {
+ @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof IDevice) {
return ((IDevice)parentElement).getClients();
@@ -115,6 +116,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
return new Object[0];
}
+ @Override
public Object getParent(Object element) {
if (element instanceof Client) {
return ((Client)element).getDevice();
@@ -122,6 +124,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
return null;
}
+ @Override
public boolean hasChildren(Object element) {
if (element instanceof IDevice) {
return ((IDevice)element).hasClients();
@@ -131,6 +134,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
return false;
}
+ @Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof AndroidDebugBridge) {
return ((AndroidDebugBridge)inputElement).getDevices();
@@ -138,10 +142,12 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
return new Object[0];
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// pass
}
@@ -155,6 +161,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
private static final String DEVICE_MODEL_PROPERTY = "ro.product.model"; //$NON-NLS-1$
private static final String DEVICE_MANUFACTURER_PROPERTY = "ro.product.manufacturer"; //$NON-NLS-1$
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == DEVICE_COL_SERIAL && element instanceof IDevice) {
IDevice device = (IDevice)element;
@@ -195,6 +202,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
if (element instanceof IDevice) {
IDevice device = (IDevice)element;
@@ -311,19 +319,23 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
return sb.toString();
}
+ @Override
public void addListener(ILabelProviderListener listener) {
// pass
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public boolean isLabelProperty(Object element, String property) {
// pass
return false;
}
+ @Override
public void removeListener(ILabelProviderListener listener) {
// pass
}
@@ -506,9 +518,11 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
*
* @see IDebugBridgeChangeListener#serverChanged(AndroidDebugBridge)
*/
+ @Override
public void bridgeChanged(final AndroidDebugBridge bridge) {
if (mTree.isDisposed() == false) {
exec(new Runnable() {
+ @Override
public void run() {
if (mTree.isDisposed() == false) {
// set up the data source.
@@ -541,8 +555,10 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
*
* @see IDeviceChangeListener#deviceConnected(IDevice)
*/
+ @Override
public void deviceConnected(IDevice device) {
exec(new Runnable() {
+ @Override
public void run() {
if (mTree.isDisposed() == false) {
// refresh all
@@ -576,6 +592,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
*
* @see IDeviceChangeListener#deviceDisconnected(IDevice)
*/
+ @Override
public void deviceDisconnected(IDevice device) {
deviceConnected(device);
@@ -594,6 +611,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
*
* @see IDeviceChangeListener#deviceChanged(IDevice)
*/
+ @Override
public void deviceChanged(final IDevice device, int changeMask) {
boolean expand = false;
synchronized (mDevicesToExpand) {
@@ -607,6 +625,7 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
final boolean finalExpand = expand;
exec(new Runnable() {
+ @Override
public void run() {
if (mTree.isDisposed() == false) {
// look if the current device is selected. This is done in case the current
@@ -655,8 +674,10 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
*
* @see IClientChangeListener#clientChanged(Client, int)
*/
+ @Override
public void clientChanged(final Client client, final int changeMask) {
exec(new Runnable() {
+ @Override
public void run() {
if (mTree.isDisposed() == false) {
// refresh the client
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/EmulatorControlPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/EmulatorControlPanel.java
index 4d36bc5..82aed98 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/EmulatorControlPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/EmulatorControlPanel.java
@@ -16,13 +16,14 @@
package com.android.ddmuilib;
-import com.android.ddmlib.IDevice;
import com.android.ddmlib.EmulatorConsole;
import com.android.ddmlib.EmulatorConsole.GsmMode;
import com.android.ddmlib.EmulatorConsole.GsmStatus;
import com.android.ddmlib.EmulatorConsole.NetworkStatus;
+import com.android.ddmlib.IDevice;
import com.android.ddmuilib.location.CoordinateControls;
import com.android.ddmuilib.location.GpxParser;
+import com.android.ddmuilib.location.GpxParser.Track;
import com.android.ddmuilib.location.KmlParser;
import com.android.ddmuilib.location.TrackContentProvider;
import com.android.ddmuilib.location.TrackLabelProvider;
@@ -30,7 +31,6 @@ import com.android.ddmuilib.location.TrackPoint;
import com.android.ddmuilib.location.WayPoint;
import com.android.ddmuilib.location.WayPointContentProvider;
import com.android.ddmuilib.location.WayPointLabelProvider;
-import com.android.ddmuilib.location.GpxParser.Track;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -401,6 +401,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
mPhoneNumber = new Text(phoneComp, SWT.BORDER | SWT.LEFT | SWT.SINGLE);
mPhoneNumber.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
mPhoneNumber.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
// Reenable the widgets based on the content of the text.
// doEnable checks the validity of the phone number to enable/disable some
@@ -484,13 +485,13 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
// delimited. For this reason, we'll replace is several steps
// replace the dual CR-LF
- message = message.replaceAll("\r\n", "\\\\n"); //$NON-NLS-1$ //$NON-NLS-1$
+ message = message.replaceAll("\r\n", "\\\\n"); //$NON-NLS-1$ //$NON-NLS-2$
// replace remaining stand alone \n
- message = message.replaceAll("\n", "\\\\n"); //$NON-NLS-1$ //$NON-NLS-1$
+ message = message.replaceAll("\n", "\\\\n"); //$NON-NLS-1$ //$NON-NLS-2$
// replace remaining stand alone \r
- message = message.replaceAll("\r", "\\\\n"); //$NON-NLS-1$ //$NON-NLS-1$
+ message = message.replaceAll("\r", "\\\\n"); //$NON-NLS-1$ //$NON-NLS-2$
processCommandResult(mEmulatorConsole.sendSms(mPhoneNumber.getText().trim(),
message));
@@ -701,6 +702,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
gpxWayPointViewer.setLabelProvider(new WayPointLabelProvider());
gpxWayPointViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection instanceof IStructuredSelection) {
@@ -748,6 +750,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
gpxTrackViewer.setLabelProvider(new TrackLabelProvider());
gpxTrackViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection instanceof IStructuredSelection) {
@@ -921,6 +924,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
});
kmlWayPointViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
if (selection instanceof IStructuredSelection) {
@@ -1075,6 +1079,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
final NetworkStatus f_netstatus = netstatus;
d.asyncExec(new Runnable() {
+ @Override
public void run() {
if (f_gsm.voice != GsmMode.UNKNOWN) {
mVoiceMode.select(getGsmComboIndex(f_gsm.voice));
@@ -1122,6 +1127,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
try {
Display d = mParent.getDisplay();
d.asyncExec(new Runnable() {
+ @Override
public void run() {
if (mParent.isDisposed() == false) {
doEnable(enabled);
@@ -1230,6 +1236,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
if (result != EmulatorConsole.RESULT_OK) {
try {
mParent.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (mParent.isDisposed() == false) {
MessageDialog.openError(mParent.getShell(), "Emulator Console",
@@ -1334,6 +1341,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
mPlayingTrack = false;
try {
mParent.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (mPlayGpxButton.isDisposed() == false) {
mPlayGpxButton.setImage(mPlayImage);
@@ -1434,6 +1442,7 @@ public class EmulatorControlPanel extends SelectionDependentPanel {
mPlayingTrack = false;
try {
mParent.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (mPlayGpxButton.isDisposed() == false) {
mPlayGpxButton.setImage(mPlayImage);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/HeapPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/HeapPanel.java
index 83cdc90..d0af8b0 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/HeapPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/HeapPanel.java
@@ -16,11 +16,11 @@
package com.android.ddmuilib;
+import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
import com.android.ddmlib.Client;
import com.android.ddmlib.ClientData;
-import com.android.ddmlib.Log;
-import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
import com.android.ddmlib.HeapSegment.HeapSegmentElement;
+import com.android.ddmlib.Log;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
@@ -223,12 +223,14 @@ public final class HeapPanel extends BaseHeapPanel {
*
* @see IClientChangeListener#clientChanged(Client, int)
*/
+ @Override
public void clientChanged(final Client client, int changeMask) {
if (client == getCurrentClient()) {
if ((changeMask & Client.CHANGE_HEAP_MODE) == Client.CHANGE_HEAP_MODE ||
(changeMask & Client.CHANGE_HEAP_DATA) == Client.CHANGE_HEAP_DATA) {
try {
mTop.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
clientSelected();
}
@@ -628,6 +630,7 @@ public final class HeapPanel extends BaseHeapPanel {
CategoryItemRenderer renderer = categoryPlot.getRenderer();
renderer.setBaseToolTipGenerator(new CategoryToolTipGenerator() {
+ @Override
public String generateToolTip(CategoryDataset dataset, int row, int column) {
// get the key for the size of the allocation
ByteLong columnKey = (ByteLong)dataset.getColumnKey(column);
@@ -871,6 +874,7 @@ public final class HeapPanel extends BaseHeapPanel {
return approximateByteCount(mValue);
}
+ @Override
public int compareTo(ByteLong other) {
if (mValue != other.mValue) {
return mValue < other.mValue ? -1 : 1;
@@ -1168,7 +1172,7 @@ public final class HeapPanel extends BaseHeapPanel {
int w, h;
// Pick an image size that the largest of heaps will fit into.
- w = (int)Math.sqrt((double)((16 * 1024 * 1024)/8));
+ w = (int)Math.sqrt(((16 * 1024 * 1024)/8));
// Space-filling curves require a power-of-2 width.
w = nextPow2(w);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/InfoPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/InfoPanel.java
index ed402c0..60dc2c0 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/InfoPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/InfoPanel.java
@@ -16,9 +16,9 @@
package com.android.ddmuilib;
+import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
import com.android.ddmlib.Client;
import com.android.ddmlib.ClientData;
-import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
@@ -98,6 +98,7 @@ public class InfoPanel extends TablePanel {
*
* @see IClientChangeListener#clientChanged(Client, int)
*/
+ @Override
public void clientChanged(final Client client, int changeMask) {
if (client == getCurrentClient()) {
if ((changeMask & Client.CHANGE_INFO) == Client.CHANGE_INFO) {
@@ -105,6 +106,7 @@ public class InfoPanel extends TablePanel {
return;
mTable.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
clientSelected();
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/NativeHeapPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/NativeHeapPanel.java
index 79191eb..337bff2 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/NativeHeapPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/NativeHeapPanel.java
@@ -353,6 +353,7 @@ public final class NativeHeapPanel extends BaseHeapPanel {
private boolean updateNHAllocationStackCalls(final ClientData clientData, final int count) {
if (mDisplay.isDisposed() == false) {
mDisplay.asyncExec(new Runnable() {
+ @Override
public void run() {
updateAllocationStackCalls(clientData, count);
}
@@ -392,6 +393,7 @@ public final class NativeHeapPanel extends BaseHeapPanel {
final int start, final int end) {
if (mDisplay.isDisposed() == false) {
mDisplay.asyncExec(new Runnable() {
+ @Override
public void run() {
updateLibraryAllocationTable(libAlloc, start, end);
}
@@ -465,6 +467,7 @@ public final class NativeHeapPanel extends BaseHeapPanel {
mSize += info.getAllocationCount() * info.getSize();
}
Collections.sort(mLibAllocations, new Comparator<NativeAllocationInfo>() {
+ @Override
public int compare(NativeAllocationInfo o1, NativeAllocationInfo o2) {
return o2.getAllocationCount() * o2.getSize() -
o1.getAllocationCount() * o1.getSize();
@@ -673,6 +676,7 @@ public final class NativeHeapPanel extends BaseHeapPanel {
*
* @see IClientChangeListener#clientChanged(Client, int)
*/
+ @Override
public void clientChanged(final Client client, int changeMask) {
if (client == getCurrentClient()) {
if ((changeMask & Client.CHANGE_NATIVE_HEAP_DATA) == Client.CHANGE_NATIVE_HEAP_DATA) {
@@ -680,6 +684,7 @@ public final class NativeHeapPanel extends BaseHeapPanel {
return;
mBase.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
clientSelected();
}
@@ -1268,6 +1273,7 @@ public final class NativeHeapPanel extends BaseHeapPanel {
// allow resizes, but cap at minPanelWidth
sash.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
Rectangle sashRect = sash.getBounds();
Rectangle panelRect = sash_composite.getClientArea();
@@ -1478,6 +1484,7 @@ public final class NativeHeapPanel extends BaseHeapPanel {
// allow resizes, but cap at minPanelWidth
sash.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
Rectangle sashRect = sash.getBounds();
Rectangle panelRect = top.getClientArea();
@@ -1540,6 +1547,7 @@ public final class NativeHeapPanel extends BaseHeapPanel {
// now we sort it
Collections.sort(mLibraryAllocations,
new Comparator<LibraryAllocations>() {
+ @Override
public int compare(LibraryAllocations o1,
LibraryAllocations o2) {
return o2.getSize() - o1.getSize();
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/StackTracePanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/StackTracePanel.java
index 3358962..336a5a3 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/StackTracePanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/StackTracePanel.java
@@ -51,13 +51,14 @@ public final class StackTracePanel {
private TableViewer mStackTraceViewer;
private Client mCurrentClient;
-
-
+
+
/**
* Content Provider to display the stack trace of a thread.
* Expected input is a {@link IStackTraceInfo} object.
*/
private static class StackTraceContentProvider implements IStructuredContentProvider {
+ @Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof IStackTraceInfo) {
// getElement cannot return null, so we return an empty array
@@ -71,15 +72,17 @@ public final class StackTracePanel {
return new Object[0];
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// pass
}
}
-
+
/**
* A Label Provider to use with {@link StackTraceContentProvider}. It expects the elements to be
@@ -87,10 +90,12 @@ public final class StackTracePanel {
*/
private static class StackTraceLabelProvider implements ITableLabelProvider {
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
if (element instanceof StackTraceElement) {
StackTraceElement traceElement = (StackTraceElement)element;
@@ -111,24 +116,28 @@ public final class StackTracePanel {
return null;
}
+ @Override
public void addListener(ILabelProviderListener listener) {
// pass
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public boolean isLabelProperty(Object element, String property) {
// pass
return false;
}
+ @Override
public void removeListener(ILabelProviderListener listener) {
// pass
}
}
-
+
/**
* Classes which implement this interface provide a method that is able to reveal a method
* in a source editor
@@ -142,8 +151,8 @@ public final class StackTracePanel {
*/
public void reveal(String applicationName, String className, int line);
}
-
-
+
+
/**
* Sets the {@link ISourceRevealer} object able to reveal source code in a source editor.
* @param revealer
@@ -151,27 +160,27 @@ public final class StackTracePanel {
public static void setSourceRevealer(ISourceRevealer revealer) {
sSourceRevealer = revealer;
}
-
+
/**
* Creates the controls for the StrackTrace display.
* <p/>This method will set the parent {@link Composite} to use a {@link GridLayout} with
* 2 columns.
* @param parent the parent composite.
- * @param prefs_stack_col_class
- * @param prefs_stack_col_method
- * @param prefs_stack_col_file
- * @param prefs_stack_col_line
- * @param prefs_stack_col_native
+ * @param prefs_stack_col_class
+ * @param prefs_stack_col_method
+ * @param prefs_stack_col_file
+ * @param prefs_stack_col_line
+ * @param prefs_stack_col_native
* @param store
*/
public Table createPanel(Composite parent, String prefs_stack_col_class,
String prefs_stack_col_method, String prefs_stack_col_file, String prefs_stack_col_line,
String prefs_stack_col_native, IPreferenceStore store) {
-
+
mStackTraceTable = new Table(parent, SWT.MULTI | SWT.FULL_SELECTION);
mStackTraceTable.setHeaderVisible(true);
mStackTraceTable.setLinesVisible(true);
-
+
TableHelper.createTableColumn(
mStackTraceTable,
"Class",
@@ -206,26 +215,27 @@ public final class StackTracePanel {
SWT.LEFT,
"Native", //$NON-NLS-1$
prefs_stack_col_native, store);
-
+
mStackTraceViewer = new TableViewer(mStackTraceTable);
mStackTraceViewer.setContentProvider(new StackTraceContentProvider());
mStackTraceViewer.setLabelProvider(new StackTraceLabelProvider());
-
+
mStackTraceViewer.addDoubleClickListener(new IDoubleClickListener() {
+ @Override
public void doubleClick(DoubleClickEvent event) {
if (sSourceRevealer != null && mCurrentClient != null) {
// get the selected stack trace element
ISelection selection = mStackTraceViewer.getSelection();
-
+
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection)selection;
Object object = structuredSelection.getFirstElement();
if (object instanceof StackTraceElement) {
StackTraceElement traceElement = (StackTraceElement)object;
-
+
if (traceElement.isNativeMethod() == false) {
sSourceRevealer.reveal(
- mCurrentClient.getClientData().getClientDescription(),
+ mCurrentClient.getClientData().getClientDescription(),
traceElement.getClassName(),
traceElement.getLineNumber());
}
@@ -237,7 +247,7 @@ public final class StackTracePanel {
return mStackTraceTable;
}
-
+
/**
* Sets the input for the {@link TableViewer}.
* @param input the {@link IStackTraceInfo} that will provide the viewer with the list of
@@ -247,7 +257,7 @@ public final class StackTracePanel {
mStackTraceViewer.setInput(input);
mStackTraceViewer.refresh();
}
-
+
/**
* Sets the current client running the stack trace.
* @param currentClient the {@link Client}.
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressHelper.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressHelper.java
index 23b749e..732de59 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressHelper.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressHelper.java
@@ -18,8 +18,8 @@ package com.android.ddmuilib;
import com.android.ddmlib.SyncException;
import com.android.ddmlib.SyncService;
-import com.android.ddmlib.TimeoutException;
import com.android.ddmlib.SyncService.ISyncProgressMonitor;
+import com.android.ddmlib.TimeoutException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
@@ -63,6 +63,7 @@ public class SyncProgressHelper {
final Exception[] result = new Exception[1];
new ProgressMonitorDialog(parentShell).run(true, true, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
try {
runnable.run(new SyncProgressMonitor(monitor, progressMessage));
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressMonitor.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressMonitor.java
index 5925984..4254f67 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressMonitor.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/SyncProgressMonitor.java
@@ -33,22 +33,27 @@ public class SyncProgressMonitor implements ISyncProgressMonitor {
mName = name;
}
+ @Override
public void start(int totalWork) {
mMonitor.beginTask(mName, totalWork);
}
+ @Override
public void stop() {
mMonitor.done();
}
+ @Override
public void advance(int work) {
mMonitor.worked(work);
}
+ @Override
public boolean isCanceled() {
return mMonitor.isCanceled();
}
+ @Override
public void startSubTask(String name) {
mMonitor.subTask(name);
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/SysinfoPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/SysinfoPanel.java
index 6727fcb..3ca5ff3 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/SysinfoPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/SysinfoPanel.java
@@ -184,6 +184,7 @@ public class SysinfoPanel extends TablePanel implements IShellOutputReceiver {
* Adds output to the temp file. IShellOutputReceiver method. Called by
* executeShellCommand().
*/
+ @Override
public void addOutput(byte[] data, int offset, int length) {
try {
mTempStream.write(data, offset, length);
@@ -198,6 +199,7 @@ public class SysinfoPanel extends TablePanel implements IShellOutputReceiver {
* output is passed to generateDataset(). Called by executeShellCommand() on
* completion.
*/
+ @Override
public void flush() {
if (mTempStream != null) {
try {
@@ -216,6 +218,7 @@ public class SysinfoPanel extends TablePanel implements IShellOutputReceiver {
*
* @return false - don't cancel
*/
+ @Override
public boolean isCancelled() {
return false;
}
@@ -302,6 +305,7 @@ public class SysinfoPanel extends TablePanel implements IShellOutputReceiver {
return top;
}
+ @Override
public void clientChanged(final Client client, int changeMask) {
// Don't care
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/TableHelper.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/TableHelper.java
index 9d557e0..66dcc0a 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/TableHelper.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/TableHelper.java
@@ -73,9 +73,11 @@ public final class TableHelper {
// listener to catch column resize to put store the new width value.
if (prefs != null && pref_name != null) {
col.addControlListener(new ControlListener() {
+ @Override
public void controlMoved(ControlEvent e) {
}
+ @Override
public void controlResized(ControlEvent e) {
// get the new width
int w = ((TableColumn)e.widget).getWidth();
@@ -132,9 +134,11 @@ public final class TableHelper {
// listener to catch column resize to put store the new width value.
if (prefs != null && pref_name != null) {
col.addControlListener(new ControlListener() {
+ @Override
public void controlMoved(ControlEvent e) {
}
+ @Override
public void controlResized(ControlEvent e) {
// get the new width
int w = ((TreeColumn)e.widget).getWidth();
@@ -187,9 +191,11 @@ public final class TableHelper {
// listener to catch column resize to put store the new width value.
if (prefs != null && pref_name != null) {
col.addControlListener(new ControlListener() {
+ @Override
public void controlMoved(ControlEvent e) {
}
+ @Override
public void controlResized(ControlEvent e) {
// get the new width
int w = ((TreeColumn)e.widget).getWidth();
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java
index 245b26e..c1eb7f6 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/TablePanel.java
@@ -68,6 +68,7 @@ public abstract class TablePanel extends ClientDisplayPanel {
final int colStart, final int colEnd) {
// create the activator for this table
final IFocusedTableActivator activator = new IFocusedTableActivator() {
+ @Override
public void copy(Clipboard clipboard) {
int[] selection = table.getSelectionIndices();
@@ -96,6 +97,7 @@ public abstract class TablePanel extends ClientDisplayPanel {
}
}
+ @Override
public void selectAll() {
table.selectAll();
}
@@ -103,10 +105,12 @@ public abstract class TablePanel extends ClientDisplayPanel {
// add the focus listener on the table to notify the global listener
table.addFocusListener(new FocusListener() {
+ @Override
public void focusGained(FocusEvent e) {
mGlobalListener.focusGained(activator);
}
+ @Override
public void focusLost(FocusEvent e) {
mGlobalListener.focusLost(activator);
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/ThreadPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/ThreadPanel.java
index bf7a58d..f88b4c4 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/ThreadPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/ThreadPanel.java
@@ -16,9 +16,9 @@
package com.android.ddmuilib;
+import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
import com.android.ddmlib.Client;
import com.android.ddmlib.ThreadInfo;
-import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -61,14 +61,14 @@ import java.util.Date;
* Base class for our information panels.
*/
public class ThreadPanel extends TablePanel {
-
+
private final static String PREFS_THREAD_COL_ID = "threadPanel.Col0"; //$NON-NLS-1$
private final static String PREFS_THREAD_COL_TID = "threadPanel.Col1"; //$NON-NLS-1$
private final static String PREFS_THREAD_COL_STATUS = "threadPanel.Col2"; //$NON-NLS-1$
private final static String PREFS_THREAD_COL_UTIME = "threadPanel.Col3"; //$NON-NLS-1$
private final static String PREFS_THREAD_COL_STIME = "threadPanel.Col4"; //$NON-NLS-1$
private final static String PREFS_THREAD_COL_NAME = "threadPanel.Col5"; //$NON-NLS-1$
-
+
private final static String PREFS_THREAD_SASH = "threadPanel.sash"; //$NON-NLS-1$
private static final String PREFS_STACK_COL_CLASS = "threadPanel.stack.col0"; //$NON-NLS-1$
@@ -76,12 +76,12 @@ public class ThreadPanel extends TablePanel {
private static final String PREFS_STACK_COL_FILE = "threadPanel.stack.col2"; //$NON-NLS-1$
private static final String PREFS_STACK_COL_LINE = "threadPanel.stack.col3"; //$NON-NLS-1$
private static final String PREFS_STACK_COL_NATIVE = "threadPanel.stack.col4"; //$NON-NLS-1$
-
+
private Display mDisplay;
private Composite mBase;
private Label mNotEnabled;
private Label mNotSelected;
-
+
private Composite mThreadBase;
private Table mThreadTable;
private TableViewer mThreadViewer;
@@ -104,12 +104,13 @@ public class ThreadPanel extends TablePanel {
"wait", "init", "start", "native", "vmwait",
"suspended"
};
-
+
/**
* Content Provider to display the threads of a client.
* Expected input is a {@link Client} object.
*/
private static class ThreadContentProvider implements IStructuredContentProvider {
+ @Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof Client) {
return ((Client)inputElement).getClientData().getThreads();
@@ -118,15 +119,17 @@ public class ThreadPanel extends TablePanel {
return new Object[0];
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// pass
}
}
-
+
/**
* A Label Provider to use with {@link ThreadContentProvider}. It expects the elements to be
@@ -134,10 +137,12 @@ public class ThreadPanel extends TablePanel {
*/
private static class ThreadLabelProvider implements ITableLabelProvider {
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
if (element instanceof ThreadInfo) {
ThreadInfo thread = (ThreadInfo)element;
@@ -163,19 +168,23 @@ public class ThreadPanel extends TablePanel {
return null;
}
+ @Override
public void addListener(ILabelProviderListener listener) {
// pass
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public boolean isLabelProperty(Object element, String property) {
// pass
return false;
}
+ @Override
public void removeListener(ILabelProviderListener listener) {
// pass
}
@@ -205,7 +214,7 @@ public class ThreadPanel extends TablePanel {
// base composite for selected client with enabled thread update.
mThreadBase = new Composite(mBase, SWT.NONE);
mThreadBase.setLayout(new FormLayout());
-
+
// table above the sash
mThreadTable = new Table(mThreadBase, SWT.MULTI | SWT.FULL_SELECTION);
mThreadTable.setHeaderVisible(true);
@@ -252,35 +261,37 @@ public class ThreadPanel extends TablePanel {
SWT.LEFT,
"android.class.ReallyLongClassName.MethodName", //$NON-NLS-1$
PREFS_THREAD_COL_NAME, store);
-
+
mThreadViewer = new TableViewer(mThreadTable);
mThreadViewer.setContentProvider(new ThreadContentProvider());
mThreadViewer.setLabelProvider(new ThreadLabelProvider());
mThreadViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
ThreadInfo selectedThread = getThreadSelection(event.getSelection());
updateThreadStackTrace(selectedThread);
}
});
mThreadViewer.addDoubleClickListener(new IDoubleClickListener() {
+ @Override
public void doubleClick(DoubleClickEvent event) {
ThreadInfo selectedThread = getThreadSelection(event.getSelection());
if (selectedThread != null) {
Client client = (Client)mThreadViewer.getInput();
-
+
if (client != null) {
client.requestThreadStackTrace(selectedThread.getThreadId());
}
}
}
});
-
+
// the separating sash
final Sash sash = new Sash(mThreadBase, SWT.HORIZONTAL);
Color darkGray = parent.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY);
sash.setBackground(darkGray);
-
+
// the UI below the sash
mStackTraceBase = new Composite(mThreadBase, SWT.NONE);
mStackTraceBase.setLayout(new GridLayout(2, false));
@@ -299,7 +310,7 @@ public class ThreadPanel extends TablePanel {
}
}
});
-
+
mStackTraceTimeLabel = new Label(mStackTraceBase, SWT.NONE);
mStackTraceTimeLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -311,11 +322,11 @@ public class ThreadPanel extends TablePanel {
PREFS_STACK_COL_LINE,
PREFS_STACK_COL_NATIVE,
store);
-
+
GridData gd;
mStackTraceTable.setLayoutData(gd = new GridData(GridData.FILL_BOTH));
gd.horizontalSpan = 2;
-
+
// now setup the sash.
// form layout data
FormData data = new FormData();
@@ -344,6 +355,7 @@ public class ThreadPanel extends TablePanel {
// allow resizes, but cap at minPanelWidth
sash.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
Rectangle sashRect = sash.getBounds();
Rectangle panelRect = mThreadBase.getClientArea();
@@ -361,7 +373,7 @@ public class ThreadPanel extends TablePanel {
return mBase;
}
-
+
/**
* Sets the focus to the proper control inside the panel.
*/
@@ -383,12 +395,14 @@ public class ThreadPanel extends TablePanel {
*
* @see IClientChangeListener#clientChanged(Client, int)
*/
+ @Override
public void clientChanged(final Client client, int changeMask) {
if (client == getCurrentClient()) {
if ((changeMask & Client.CHANGE_THREAD_MODE) != 0 ||
(changeMask & Client.CHANGE_THREAD_DATA) != 0) {
try {
mThreadTable.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
clientSelected();
}
@@ -399,6 +413,7 @@ public class ThreadPanel extends TablePanel {
} else if ((changeMask & Client.CHANGE_THREAD_STACKTRACE) != 0) {
try {
mThreadTable.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
updateThreadStackCall();
}
@@ -430,7 +445,7 @@ public class ThreadPanel extends TablePanel {
}
Client client = getCurrentClient();
-
+
mStackTracePanel.setCurrentClient(client);
if (client != null) {
@@ -462,7 +477,7 @@ public class ThreadPanel extends TablePanel {
mBase.layout();
}
-
+
/**
* Updates the stack call of the currently selected thread.
* <p/>
@@ -473,7 +488,7 @@ public class ThreadPanel extends TablePanel {
if (client != null) {
// get the current selection in the ThreadTable
ThreadInfo selectedThread = getThreadSelection(null);
-
+
if (selectedThread != null) {
updateThreadStackTrace(selectedThread);
} else {
@@ -481,7 +496,7 @@ public class ThreadPanel extends TablePanel {
}
}
}
-
+
/**
* updates the stackcall of the specified thread. If <code>null</code> the UI is emptied
* of current data.
@@ -489,7 +504,7 @@ public class ThreadPanel extends TablePanel {
*/
private void updateThreadStackTrace(ThreadInfo thread) {
mStackTracePanel.setViewerInput(thread);
-
+
if (thread != null) {
mRefreshStackTraceButton.setEnabled(true);
long stackcallTime = thread.getStackCallTime();
@@ -521,6 +536,7 @@ public class ThreadPanel extends TablePanel {
int initialWait = 1000;
mDisplay.timerExec(initialWait, new Runnable() {
+ @Override
public void run() {
synchronized (mLock) {
// lets check we still want updates.
@@ -545,7 +561,7 @@ public class ThreadPanel extends TablePanel {
}
});
}
-
+
/**
* Returns the current thread selection or <code>null</code> if none is found.
* If a {@link ISelection} object is specified, the first {@link ThreadInfo} from this selection
@@ -557,7 +573,7 @@ public class ThreadPanel extends TablePanel {
if (selection == null) {
selection = mThreadViewer.getSelection();
}
-
+
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection)selection;
Object object = structuredSelection.getFirstElement();
@@ -565,7 +581,7 @@ public class ThreadPanel extends TablePanel {
return (ThreadInfo)object;
}
}
-
+
return null;
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/actions/ToolItemAction.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/actions/ToolItemAction.java
index bc1598f..c7fef32 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/actions/ToolItemAction.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/actions/ToolItemAction.java
@@ -38,6 +38,7 @@ public class ToolItemAction implements ICommonAction {
* <code>false</code> to disable
* @see ICommonAction#setChecked(boolean)
*/
+ @Override
public void setChecked(boolean checked) {
item.setSelection(checked);
}
@@ -48,6 +49,7 @@ public class ToolItemAction implements ICommonAction {
* <code>false</code> to disable
* @see ICommonAction#setEnabled(boolean)
*/
+ @Override
public void setEnabled(boolean enabled) {
item.setEnabled(enabled);
}
@@ -57,6 +59,7 @@ public class ToolItemAction implements ICommonAction {
* {@link SelectionListener#widgetSelected(SelectionEvent)} on the wrapped {@link ToolItem}).
* @see ICommonAction#setRunnable(Runnable)
*/
+ @Override
public void setRunnable(final Runnable runnable) {
item.addSelectionListener(new SelectionAdapter() {
@Override
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceContentProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceContentProvider.java
index 75c19fe..062d4f0 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceContentProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceContentProvider.java
@@ -36,12 +36,14 @@ class DeviceContentProvider implements ITreeContentProvider {
private FileEntry mRootEntry;
private IListingReceiver sListingReceiver = new IListingReceiver() {
+ @Override
public void setChildren(final FileEntry entry, FileEntry[] children) {
final Tree t = mViewer.getTree();
if (t != null && t.isDisposed() == false) {
Display display = t.getDisplay();
if (display.isDisposed() == false) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if (t.isDisposed() == false) {
// refresh the entry.
@@ -58,12 +60,14 @@ class DeviceContentProvider implements ITreeContentProvider {
}
}
+ @Override
public void refreshEntry(final FileEntry entry) {
final Tree t = mViewer.getTree();
if (t != null && t.isDisposed() == false) {
Display display = t.getDisplay();
if (display.isDisposed() == false) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if (t.isDisposed() == false) {
// refresh the entry.
@@ -89,6 +93,7 @@ class DeviceContentProvider implements ITreeContentProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
*/
+ @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof FileEntry) {
FileEntry parentEntry = (FileEntry)parentElement;
@@ -112,6 +117,7 @@ class DeviceContentProvider implements ITreeContentProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
*/
+ @Override
public Object getParent(Object element) {
if (element instanceof FileEntry) {
FileEntry entry = (FileEntry)element;
@@ -124,6 +130,7 @@ class DeviceContentProvider implements ITreeContentProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
*/
+ @Override
public boolean hasChildren(Object element) {
if (element instanceof FileEntry) {
FileEntry entry = (FileEntry)element;
@@ -136,6 +143,7 @@ class DeviceContentProvider implements ITreeContentProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
*/
+ @Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof FileEntry) {
FileEntry entry = (FileEntry)inputElement;
@@ -150,12 +158,14 @@ class DeviceContentProvider implements ITreeContentProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
*/
+ @Override
public void dispose() {
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if (viewer instanceof TreeViewer) {
mViewer = (TreeViewer)viewer;
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceExplorer.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceExplorer.java
index a466be1..b69d3b5 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceExplorer.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/DeviceExplorer.java
@@ -203,6 +203,7 @@ public class DeviceExplorer extends Panel {
// setup a listener for selection
mTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection sel = event.getSelection();
if (sel.isEmpty()) {
@@ -234,6 +235,7 @@ public class DeviceExplorer extends Panel {
// add support for double click
mTreeViewer.addDoubleClickListener(new IDoubleClickListener() {
+ @Override
public void doubleClick(DoubleClickEvent event) {
ISelection sel = event.getSelection();
@@ -355,6 +357,7 @@ public class DeviceExplorer extends Panel {
Display display = mTree.getDisplay();
if (display.isDisposed() == false) {
display.asyncExec(new Runnable() {
+ @Override
public void run() {
if (mTree.isDisposed() == false) {
mTreeViewer.refresh(true);
@@ -599,15 +602,18 @@ public class DeviceExplorer extends Panel {
try {
mCurrentDevice.executeShellCommand(command, new IShellOutputReceiver() {
+ @Override
public void addOutput(byte[] data, int offset, int length) {
// pass
// TODO get output to display errors if any.
}
+ @Override
public void flush() {
mTreeViewer.refresh(parentEntry);
}
+ @Override
public boolean isCancelled() {
return false;
}
@@ -640,6 +646,7 @@ public class DeviceExplorer extends Panel {
if (entry.isDirectory()) {
InputDialog inputDialog = new InputDialog(mTree.getShell(), "New Folder",
"Please enter the new folder name", "New Folder", new IInputValidator() {
+ @Override
public String isValid(String newText) {
if ((newText != null) && (newText.length() > 0)
&& (newText.trim().length() > 0)
@@ -662,14 +669,17 @@ public class DeviceExplorer extends Panel {
try {
mCurrentDevice.executeShellCommand(command, new IShellOutputReceiver() {
+ @Override
public boolean isCancelled() {
return false;
}
+ @Override
public void flush() {
mTreeViewer.refresh(entry);
}
+ @Override
public void addOutput(byte[] data, int offset, int length) {
String errorMessage;
if (data != null) {
@@ -722,6 +732,7 @@ public class DeviceExplorer extends Panel {
if (mTree.isDisposed() == false) {
Display d = mTree.getDisplay();
d.asyncExec(new Runnable() {
+ @Override
public void run() {
if (mTree.isDisposed() == false) {
// new service
@@ -744,6 +755,7 @@ public class DeviceExplorer extends Panel {
private void refresh(final FileEntry entry) {
Display d = mTreeViewer.getTree().getDisplay();
d.asyncExec(new Runnable() {
+ @Override
public void run() {
mTreeViewer.refresh(entry);
}
@@ -771,11 +783,13 @@ public class DeviceExplorer extends Panel {
new FileEntry[entries.size()]);
SyncProgressHelper.run(new SyncRunnable() {
+ @Override
public void run(ISyncProgressMonitor monitor)
throws SyncException, IOException, TimeoutException {
sync.pull(entryArray, localDirectory, monitor);
}
+ @Override
public void close() {
sync.close();
}
@@ -802,11 +816,13 @@ public class DeviceExplorer extends Panel {
final SyncService sync = mCurrentDevice.getSyncService();
if (sync != null) {
SyncProgressHelper.run(new SyncRunnable() {
+ @Override
public void run(ISyncProgressMonitor monitor)
throws SyncException, IOException, TimeoutException {
sync.pullFile(remote, local, monitor);
}
+ @Override
public void close() {
sync.close();
}
@@ -834,11 +850,13 @@ public class DeviceExplorer extends Panel {
final SyncService sync = mCurrentDevice.getSyncService();
if (sync != null) {
SyncProgressHelper.run(new SyncRunnable() {
+ @Override
public void run(ISyncProgressMonitor monitor)
throws SyncException, IOException, TimeoutException {
sync.push(localFiles, remoteDirectory, monitor);
}
+ @Override
public void close() {
sync.close();
}
@@ -871,11 +889,13 @@ public class DeviceExplorer extends Panel {
+ name;
SyncProgressHelper.run(new SyncRunnable() {
+ @Override
public void run(ISyncProgressMonitor monitor)
throws SyncException, IOException, TimeoutException {
sync.pushFile(local, remoteFile, monitor);
}
+ @Override
public void close() {
sync.close();
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/FileLabelProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/FileLabelProvider.java
index 1dca962..1240e59 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/FileLabelProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/explorer/FileLabelProvider.java
@@ -65,6 +65,7 @@ class FileLabelProvider implements ILabelProvider, ITableLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
*/
+ @Override
public Image getImage(Object element) {
return null;
}
@@ -72,10 +73,12 @@ class FileLabelProvider implements ILabelProvider, ITableLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
+ @Override
public String getText(Object element) {
return null;
}
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == 0) {
if (element instanceof FileEntry) {
@@ -100,6 +103,7 @@ class FileLabelProvider implements ILabelProvider, ITableLabelProvider {
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
if (element instanceof FileEntry) {
FileEntry entry = (FileEntry)element;
@@ -125,6 +129,7 @@ class FileLabelProvider implements ILabelProvider, ITableLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
*/
+ @Override
public void addListener(ILabelProviderListener listener) {
// we don't need listeners.
}
@@ -132,12 +137,14 @@ class FileLabelProvider implements ILabelProvider, ITableLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
*/
+ @Override
public void dispose() {
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
*/
+ @Override
public boolean isLabelProperty(Object element, String property) {
return false;
}
@@ -145,6 +152,7 @@ class FileLabelProvider implements ILabelProvider, ITableLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
*/
+ @Override
public void removeListener(ILabelProviderListener listener) {
// we don't need listeners
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/BaseFileHandler.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/BaseFileHandler.java
index 83ff0ba..f50a94c 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/BaseFileHandler.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/BaseFileHandler.java
@@ -16,12 +16,12 @@
package com.android.ddmuilib.handler;
-import com.android.ddmlib.SyncException;
-import com.android.ddmlib.SyncService;
-import com.android.ddmlib.TimeoutException;
import com.android.ddmlib.ClientData.IHprofDumpHandler;
import com.android.ddmlib.ClientData.IMethodProfilingHandler;
+import com.android.ddmlib.SyncException;
+import com.android.ddmlib.SyncService;
import com.android.ddmlib.SyncService.ISyncProgressMonitor;
+import com.android.ddmlib.TimeoutException;
import com.android.ddmuilib.SyncProgressHelper;
import com.android.ddmuilib.SyncProgressHelper.SyncRunnable;
@@ -78,11 +78,13 @@ public abstract class BaseFileHandler {
final String localFilePath = fileDialog.open();
if (localFilePath != null) {
SyncProgressHelper.run(new SyncRunnable() {
+ @Override
public void run(ISyncProgressMonitor monitor) throws SyncException, IOException,
TimeoutException {
sync.pullFile(remoteFilePath, localFilePath, monitor);
}
+ @Override
public void close() {
sync.close();
}
@@ -131,6 +133,7 @@ public abstract class BaseFileHandler {
*/
protected void displayErrorInUiThread(final String format, final Object... args) {
mParentShell.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
MessageDialog.openError(mParentShell, getDialogTitle(),
String.format(format, args));
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/MethodProfilingHandler.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/MethodProfilingHandler.java
index 10680f7..ab1b5f7 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/MethodProfilingHandler.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/handler/MethodProfilingHandler.java
@@ -54,6 +54,7 @@ public class MethodProfilingHandler extends BaseFileHandler
return "Method Profiling Error";
}
+ @Override
public void onStartFailure(final Client client, final String message) {
displayErrorInUiThread(
"Unable to create Method Profiling file for application '%1$s'\n\n%2$s" +
@@ -62,6 +63,7 @@ public class MethodProfilingHandler extends BaseFileHandler
message != null ? message + "\n\n" : "");
}
+ @Override
public void onEndFailure(final Client client, final String message) {
displayErrorInUiThread(
"Unable to finish Method Profiling for application '%1$s'\n\n%2$s" +
@@ -70,8 +72,10 @@ public class MethodProfilingHandler extends BaseFileHandler
message != null ? message + "\n\n" : "");
}
+ @Override
public void onSuccess(final String remoteFilePath, final Client client) {
mParentShell.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
if (remoteFilePath == null) {
displayErrorFromUiThread(
@@ -100,6 +104,7 @@ public class MethodProfilingHandler extends BaseFileHandler
});
}
+ @Override
public void onSuccess(byte[] data, final Client client) {
try {
File tempFile = saveTempFile(data, DdmConstants.DOT_TRACE);
@@ -124,11 +129,13 @@ public class MethodProfilingHandler extends BaseFileHandler
// pull the file
try {
SyncProgressHelper.run(new SyncRunnable() {
+ @Override
public void run(ISyncProgressMonitor monitor)
throws SyncException, IOException, TimeoutException {
sync.pullFile(remoteFilePath, tempPath, monitor);
}
+ @Override
public void close() {
sync.close();
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapDataImporter.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapDataImporter.java
index e5f4fdb..88db5cc 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapDataImporter.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapDataImporter.java
@@ -44,6 +44,7 @@ public class NativeHeapDataImporter implements IRunnableWithProgress {
mReader.setLineNumber(1); // start numbering at 1
}
+ @Override
public void run(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
monitor.beginTask("Importing Heap Data", IProgressMonitor.UNKNOWN);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapLabelProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapLabelProvider.java
index 874e9d6..b96fa02 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapLabelProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapLabelProvider.java
@@ -29,10 +29,12 @@ import org.eclipse.swt.graphics.Image;
public class NativeHeapLabelProvider extends LabelProvider implements ITableLabelProvider {
private long mTotalSize;
+ @Override
public Image getColumnImage(Object arg0, int arg1) {
return null;
}
+ @Override
public String getColumnText(Object element, int index) {
if (element instanceof NativeAllocationInfo) {
return getColumnTextForNativeAllocation((NativeAllocationInfo) element, index);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapPanel.java
index 72cdc22..5f7abe2 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapPanel.java
@@ -24,9 +24,9 @@ import com.android.ddmlib.NativeStackCallInfo;
import com.android.ddmuilib.Addr2Line;
import com.android.ddmuilib.BaseHeapPanel;
import com.android.ddmuilib.ITableFocusListener;
+import com.android.ddmuilib.ITableFocusListener.IFocusedTableActivator;
import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.TableHelper;
-import com.android.ddmuilib.ITableFocusListener.IFocusedTableActivator;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
@@ -165,6 +165,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
}
/** {@inheritDoc} */
+ @Override
public void clientChanged(final Client client, int changeMask) {
if (client != getCurrentClient()) {
return;
@@ -195,6 +196,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
t.start();
} else {
Display.getDefault().asyncExec(new Runnable() {
+ @Override
public void run() {
resolveSymbols();
mDetailsTreeViewer.refresh();
@@ -361,6 +363,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
private void updateDisplay() {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
updateSnapshotIndexCombo();
updateToolbars();
@@ -374,6 +377,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
private void displaySelectedSnapshot() {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
int idx = mSnapshotIndexCombo.getSelectionIndex();
displaySnapshot(idx);
@@ -654,6 +658,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
mSymbolSearchPathText.setMessage(SYMBOL_SEARCH_PATH_TEXT_MESSAGE);
mSymbolSearchPathText.setToolTipText(SYMBOL_SEARCH_PATH_TOOLTIP_TEXT);
mSymbolSearchPathText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent arg0) {
String path = mSymbolSearchPathText.getText();
updateSearchPath(path);
@@ -743,6 +748,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
stackTraceTree.setLayoutData(data);
sash.addListener(SWT.Selection, new Listener() {
+ @Override
public void handleEvent(Event e) {
Rectangle sashRect = sash.getBounds();
Rectangle panelRect = c.getClientArea();
@@ -826,6 +832,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
final NativeHeapSnapshot snapshot = mNativeHeapSnapshots.get(idx);
Thread t = new Thread(new Runnable() {
+ @Override
public void run() {
PrintWriter out;
try {
@@ -843,6 +850,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
private void displayErrorMessage(final String message) {
Display.getDefault().syncExec(new Runnable() {
+ @Override
public void run() {
MessageDialog.openError(Display.getDefault().getActiveShell(),
"Failed to export heap data", message);
@@ -992,21 +1000,25 @@ public class NativeHeapPanel extends BaseHeapPanel {
final Tree heapSitesTree = mDetailsTreeViewer.getTree();
final IFocusedTableActivator heapSitesActivator = new IFocusedTableActivator() {
+ @Override
public void copy(Clipboard clipboard) {
TreeItem[] items = heapSitesTree.getSelection();
copyToClipboard(items, clipboard);
}
+ @Override
public void selectAll() {
heapSitesTree.selectAll();
}
};
heapSitesTree.addFocusListener(new FocusListener() {
+ @Override
public void focusLost(FocusEvent arg0) {
mTableFocusListener.focusLost(heapSitesActivator);
}
+ @Override
public void focusGained(FocusEvent arg0) {
mTableFocusListener.focusGained(heapSitesActivator);
}
@@ -1014,21 +1026,25 @@ public class NativeHeapPanel extends BaseHeapPanel {
final Tree stackTraceTree = mStackTraceTreeViewer.getTree();
final IFocusedTableActivator stackTraceActivator = new IFocusedTableActivator() {
+ @Override
public void copy(Clipboard clipboard) {
TreeItem[] items = stackTraceTree.getSelection();
copyToClipboard(items, clipboard);
}
+ @Override
public void selectAll() {
stackTraceTree.selectAll();
}
};
stackTraceTree.addFocusListener(new FocusListener() {
+ @Override
public void focusLost(FocusEvent arg0) {
mTableFocusListener.focusLost(stackTraceActivator);
}
+ @Override
public void focusGained(FocusEvent arg0) {
mTableFocusListener.focusGained(stackTraceActivator);
}
@@ -1068,6 +1084,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
mResolvedSymbolCache = new HashMap<Long, NativeStackCallInfo>();
}
+ @Override
public void run() {
for (NativeAllocationInfo callSite : mCallSites) {
if (callSite.isStackCallResolved()) {
@@ -1094,6 +1111,7 @@ public class NativeHeapPanel extends BaseHeapPanel {
}
Display.getDefault().asyncExec(new Runnable() {
+ @Override
public void run() {
mDetailsTreeViewer.refresh();
mStackTraceTreeViewer.refresh();
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByAllocations.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByAllocations.java
index 54982b1..c31716b 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByAllocations.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByAllocations.java
@@ -39,17 +39,21 @@ public final class NativeHeapProviderByAllocations implements ILazyTreeContentPr
mDisplayZygoteMemory = displayZygotes;
}
+ @Override
public void dispose() {
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
mNativeHeapDump = (NativeHeapSnapshot) newInput;
}
+ @Override
public Object getParent(Object arg0) {
return null;
}
+ @Override
public void updateChildCount(Object element, int currentChildCount) {
int childCount = 0;
@@ -60,6 +64,7 @@ public final class NativeHeapProviderByAllocations implements ILazyTreeContentPr
mViewer.setChildCount(element, childCount);
}
+ @Override
public void updateElement(Object parent, int index) {
Object item = null;
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByLibrary.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByLibrary.java
index aefb38c..b786bfa 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByLibrary.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeHeapProviderByLibrary.java
@@ -36,16 +36,20 @@ public class NativeHeapProviderByLibrary implements ILazyTreeContentProvider {
mDisplayZygoteMemory = displayZygotes;
}
+ @Override
public void dispose() {
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
+ @Override
public Object getParent(Object element) {
return null;
}
+ @Override
public void updateChildCount(Object element, int currentChildCount) {
int childCount = 0;
@@ -57,6 +61,7 @@ public class NativeHeapProviderByLibrary implements ILazyTreeContentProvider {
mViewer.setChildCount(element, childCount);
}
+ @Override
public void updateElement(Object parent, int index) {
Object item = null;
int childCount = 0;
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeLibraryAllocationInfo.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeLibraryAllocationInfo.java
index 7bc2649..1722cdb 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeLibraryAllocationInfo.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeLibraryAllocationInfo.java
@@ -112,6 +112,7 @@ public final class NativeLibraryAllocationInfo {
// finally, sort by total size
Collections.sort(libraryAllocations, new Comparator<NativeLibraryAllocationInfo>() {
+ @Override
public int compare(NativeLibraryAllocationInfo o1,
NativeLibraryAllocationInfo o2) {
return (int) (o2.getTotalSize() - o1.getTotalSize());
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackContentProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackContentProvider.java
index 54001d2..9a6ddb2 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackContentProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackContentProvider.java
@@ -22,16 +22,20 @@ import org.eclipse.jface.viewers.Viewer;
import java.util.List;
public class NativeStackContentProvider implements ITreeContentProvider {
+ @Override
public Object[] getElements(Object arg0) {
return getChildren(arg0);
}
+ @Override
public void dispose() {
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
+ @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof List<?>) {
return ((List<?>) parentElement).toArray();
@@ -40,10 +44,12 @@ public class NativeStackContentProvider implements ITreeContentProvider {
return null;
}
+ @Override
public Object getParent(Object element) {
return null;
}
+ @Override
public boolean hasChildren(Object element) {
return false;
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackLabelProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackLabelProvider.java
index e59e787..b7428b9 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackLabelProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeStackLabelProvider.java
@@ -23,10 +23,12 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
public class NativeStackLabelProvider extends LabelProvider implements ITableLabelProvider {
+ @Override
public Image getColumnImage(Object arg0, int arg1) {
return null;
}
+ @Override
public String getColumnText(Object element, int index) {
if (element instanceof NativeStackCallInfo) {
return getResolvedStackTraceColumnText((NativeStackCallInfo) element, index);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeSymbolResolverTask.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeSymbolResolverTask.java
index 5302fcb..1a75c6e 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeSymbolResolverTask.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/heap/NativeSymbolResolverTask.java
@@ -100,6 +100,7 @@ public class NativeSymbolResolverTask implements IRunnableWithProgress {
mNotFoundLibraries = new HashSet<String>();
}
+ @Override
public void run(IProgressMonitor monitor)
throws InvocationTargetException, InterruptedException {
monitor.beginTask("Resolving symbols", IProgressMonitor.UNKNOWN);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/CoordinateControls.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/CoordinateControls.java
index 0620f76..2aef53c 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/CoordinateControls.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/CoordinateControls.java
@@ -52,6 +52,7 @@ public final class CoordinateControls {
* ModifyListener for the 3 {@link Text} controls of the sexagesimal mode.
*/
private ModifyListener mSexagesimalListener = new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent event) {
if (mManualTextChange > 0) {
return;
@@ -75,6 +76,7 @@ public final class CoordinateControls {
*/
public void createDecimalText(Composite parent) {
mDecimalText = createTextControl(parent, "-199.999999", new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent event) {
if (mManualTextChange > 0) {
return;
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackContentProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackContentProvider.java
index 7fb37ce..da21920 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackContentProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackContentProvider.java
@@ -23,10 +23,11 @@ import org.eclipse.jface.viewers.Viewer;
/**
* Content provider to display {@link Track} objects in a Table.
- * <p/>The expected type for the input is {@link Track}<code>[]</code>.
+ * <p/>The expected type for the input is {@link Track}<code>[]</code>.
*/
public class TrackContentProvider implements IStructuredContentProvider {
+ @Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof Track[]) {
return (Track[])inputElement;
@@ -35,10 +36,12 @@ public class TrackContentProvider implements IStructuredContentProvider {
return new Object[0];
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// pass
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackLabelProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackLabelProvider.java
index 81d1f7d..50acb53 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackLabelProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/TrackLabelProvider.java
@@ -30,10 +30,12 @@ import java.util.Date;
*/
public class TrackLabelProvider implements ITableLabelProvider {
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
if (element instanceof Track) {
Track track = (Track)element;
@@ -62,19 +64,23 @@ public class TrackLabelProvider implements ITableLabelProvider {
return null;
}
+ @Override
public void addListener(ILabelProviderListener listener) {
// pass
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public boolean isLabelProperty(Object element, String property) {
// pass
return false;
}
+ @Override
public void removeListener(ILabelProviderListener listener) {
// pass
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointContentProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointContentProvider.java
index fced777..1b7fe15 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointContentProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointContentProvider.java
@@ -21,10 +21,11 @@ import org.eclipse.jface.viewers.Viewer;
/**
* Content provider to display {@link WayPoint} objects in a Table.
- * <p/>The expected type for the input is {@link WayPoint}<code>[]</code>.
+ * <p/>The expected type for the input is {@link WayPoint}<code>[]</code>.
*/
public class WayPointContentProvider implements IStructuredContentProvider {
+ @Override
public Object[] getElements(Object inputElement) {
if (inputElement instanceof WayPoint[]) {
return (WayPoint[])inputElement;
@@ -33,10 +34,12 @@ public class WayPointContentProvider implements IStructuredContentProvider {
return new Object[0];
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
// pass
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointLabelProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointLabelProvider.java
index f5e6f1b..9f642f1 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointLabelProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/location/WayPointLabelProvider.java
@@ -26,10 +26,12 @@ import org.eclipse.swt.widgets.Table;
*/
public class WayPointLabelProvider implements ITableLabelProvider {
+ @Override
public Image getColumnImage(Object element, int columnIndex) {
return null;
}
+ @Override
public String getColumnText(Object element, int columnIndex) {
if (element instanceof WayPoint) {
WayPoint wayPoint = (WayPoint)element;
@@ -54,19 +56,23 @@ public class WayPointLabelProvider implements ITableLabelProvider {
return null;
}
+ @Override
public void addListener(ILabelProviderListener listener) {
// pass
}
+ @Override
public void dispose() {
// pass
}
+ @Override
public boolean isLabelProperty(Object element, String property) {
// pass
return false;
}
+ @Override
public void removeListener(ILabelProviderListener listener) {
// pass
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplayLog.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplayLog.java
index 26296f3..8e7c1ac 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplayLog.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplayLog.java
@@ -22,6 +22,7 @@ import com.android.ddmlib.log.EventValueDescription;
import com.android.ddmlib.log.InvalidTypeException;
import com.android.ddmuilib.DdmUiPreferences;
import com.android.ddmuilib.TableHelper;
+
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ControlAdapter;
@@ -93,7 +94,7 @@ public class DisplayLog extends EventDisplay {
// get the date.
Calendar c = Calendar.getInstance();
- long msec = (long) event.sec * 1000L;
+ long msec = event.sec * 1000L;
c.setTimeInMillis(msec);
// convert the time into a string
@@ -147,7 +148,7 @@ public class DisplayLog extends EventDisplay {
// get the date.
Calendar c = Calendar.getInstance();
- long msec = (long) event.sec * 1000L;
+ long msec = event.sec * 1000L;
c.setTimeInMillis(msec);
// convert the time into a string
@@ -247,6 +248,7 @@ public class DisplayLog extends EventDisplay {
mainComp.setLayout(gl = new GridLayout(1, false));
gl.marginHeight = gl.marginWidth = 0;
mainComp.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
mLogTable = null;
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplay.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplay.java
index 7fdb403..d0d2789 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplay.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplay.java
@@ -560,6 +560,7 @@ abstract class EventDisplay {
xyPlot.setDomainCrosshairLockedOnData(true);
mChart.addChangeListener(new ChartChangeListener() {
+ @Override
public void chartChanged(ChartChangeEvent event) {
ChartChangeEventType type = event.getType();
if (type == ChartChangeEventType.GENERAL) {
@@ -567,6 +568,7 @@ abstract class EventDisplay {
// updated on the draw, but the notification happens before the draw,
// we process the click in a future runnable!
parent.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
processClick(xyPlot);
}
@@ -590,6 +592,7 @@ abstract class EventDisplay {
true); // tooltips
mChartComposite.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
mValueTypeDataSetMap.clear();
mDataSetCount = 0;
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplayOptions.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplayOptions.java
index d746753..b13f3f4 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplayOptions.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventDisplayOptions.java
@@ -23,6 +23,7 @@ import com.android.ddmuilib.DdmUiPreferences;
import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.log.event.EventDisplay.OccurrenceDisplayDescriptor;
import com.android.ddmuilib.log.event.EventDisplay.ValueDisplayDescriptor;
+
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -197,6 +198,7 @@ class EventDisplayOptions extends Dialog {
createRightPanel(rightPanel);
mShell.addListener(SWT.Close, new Listener() {
+ @Override
public void handleEvent(Event event) {
event.doit = true;
}
@@ -365,6 +367,7 @@ class EventDisplayOptions extends Dialog {
mDisplayWidthText.setText(Integer.toString(
store.getInt(EventLogPanel.PREFS_DISPLAY_WIDTH)));
mDisplayWidthText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
String text = mDisplayWidthText.getText().trim();
try {
@@ -384,6 +387,7 @@ class EventDisplayOptions extends Dialog {
mDisplayHeightText.setText(Integer.toString(
store.getInt(EventLogPanel.PREFS_DISPLAY_HEIGHT)));
mDisplayHeightText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
String text = mDisplayHeightText.getText().trim();
try {
@@ -410,6 +414,7 @@ class EventDisplayOptions extends Dialog {
mDisplayNameText = new Text(mInfoGroup, SWT.BORDER | SWT.LEFT | SWT.SINGLE);
mDisplayNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
mDisplayNameText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
if (mProcessTextChanges) {
EventDisplay eventDisplay = getCurrentEventDisplay();
@@ -466,6 +471,7 @@ class EventDisplayOptions extends Dialog {
mTimeLimitText = new Text(mChartOptions, SWT.BORDER);
mTimeLimitText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
mTimeLimitText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent arg0) {
String text = mTimeLimitText.getText().trim();
EventDisplay eventDisplay = getCurrentEventDisplay();
@@ -498,6 +504,7 @@ class EventDisplayOptions extends Dialog {
mHistWidthText = new Text(mHistOptions, SWT.BORDER);
mHistWidthText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
mHistWidthText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent arg0) {
String text = mHistWidthText.getText().trim();
EventDisplay eventDisplay = getCurrentEventDisplay();
@@ -540,6 +547,7 @@ class EventDisplayOptions extends Dialog {
mPidText = new Text(mInfoGroup, SWT.BORDER);
mPidText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
mPidText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
if (mProcessTextChanges) {
EventDisplay eventDisplay = getCurrentEventDisplay();
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventLogPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventLogPanel.java
index 49f9eae..4faac3a 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventLogPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventLogPanel.java
@@ -128,6 +128,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
ICommonAction saveAction, ICommonAction loadAction, ICommonAction importAction) {
mOptionsAction = optionsAction;
mOptionsAction.setRunnable(new Runnable() {
+ @Override
public void run() {
openOptionPanel();
}
@@ -135,6 +136,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
mClearAction = clearAction;
mClearAction.setRunnable(new Runnable() {
+ @Override
public void run() {
clearLog();
}
@@ -142,6 +144,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
mSaveAction = saveAction;
mSaveAction.setRunnable(new Runnable() {
+ @Override
public void run() {
try {
FileDialog fileDialog = new FileDialog(mParent.getShell(), SWT.SAVE);
@@ -160,6 +163,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
mLoadAction = loadAction;
mLoadAction.setRunnable(new Runnable() {
+ @Override
public void run() {
FileDialog fileDialog = new FileDialog(mParent.getShell(), SWT.OPEN);
@@ -174,6 +178,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
mImportAction = importAction;
mImportAction.setRunnable(new Runnable() {
+ @Override
public void run() {
FileDialog fileDialog = new FileDialog(mParent.getShell(), SWT.OPEN);
@@ -325,6 +330,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
* (non-Javadoc)
* @see com.android.ddmlib.AndroidDebugBridge.IClientChangeListener#clientChanged(com.android.ddmlib.Client, int)
*/
+ @Override
public void clientChanged(Client client, int changeMask) {
// pass
}
@@ -336,6 +342,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
protected Control createControl(Composite parent) {
mParent = parent;
mParent.addDisposeListener(new DisposeListener() {
+ @Override
public void widgetDisposed(DisposeEvent e) {
synchronized (mLock) {
if (mCurrentLogReceiver != null) {
@@ -578,6 +585,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
// run sync as we need to update right now.
d.syncExec(new Runnable() {
+ @Override
public void run() {
if (mBottomParentPanel.isDisposed() == false) {
resetUiFromUiThread();
@@ -680,6 +688,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
* @param entry The new log entry
* @see LogReceiver.ILogListener#newEntry(LogEntry)
*/
+ @Override
@WorkerThread
public void newEntry(LogEntry entry) {
synchronized (mLock) {
@@ -724,6 +733,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
try {
Display d = mBottomParentPanel.getDisplay();
d.asyncExec(new Runnable() {
+ @Override
public void run() {
if (mBottomParentPanel.isDisposed() == false) {
if (mCurrentEventLogParser != null) {
@@ -741,6 +751,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
* Processes raw data coming from the log service.
* @see LogReceiver.ILogListener#newData(byte[], int, int)
*/
+ @Override
public void newData(byte[] data, int offset, int length) {
if (mTempFile != null) {
try {
@@ -861,6 +872,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
Display d = mBottomParentPanel.getDisplay();
d.asyncExec(new Runnable() {
+ @Override
public void run() {
if (mBottomParentPanel.isDisposed() == false) {
for (EventDisplay eventDisplay : mEventDisplays) {
@@ -882,6 +894,7 @@ public class EventLogPanel extends TablePanel implements ILogListener,
}
}
+ @Override
@UiThread
public void columnResized(int index, TableColumn sourceColumn) {
for (EventDisplay eventDisplay : mEventDisplays) {
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventValueSelector.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventValueSelector.java
index dd32e2c..e7c5196 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventValueSelector.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/EventValueSelector.java
@@ -16,10 +16,10 @@
package com.android.ddmuilib.log.event;
-import com.android.ddmlib.log.EventLogParser;
-import com.android.ddmlib.log.EventValueDescription;
import com.android.ddmlib.log.EventContainer.CompareMethod;
import com.android.ddmlib.log.EventContainer.EventValueType;
+import com.android.ddmlib.log.EventLogParser;
+import com.android.ddmlib.log.EventValueDescription;
import com.android.ddmuilib.log.event.EventDisplay.OccurrenceDisplayDescriptor;
import com.android.ddmuilib.log.event.EventDisplay.ValueDisplayDescriptor;
@@ -64,16 +64,16 @@ final class EventValueSelector extends Dialog {
private EventLogParser mLogParser;
private OccurrenceDisplayDescriptor mDescriptor;
-
+
/** list of event integer in the order of the combo. */
private Integer[] mEventTags;
-
+
/** list of indices in the {@link EventValueDescription} array of the current event
* that are of type string. This lets us get back the {@link EventValueDescription} from the
* index in the Series {@link Combo}.
*/
private final ArrayList<Integer> mSeriesIndices = new ArrayList<Integer>();
-
+
public EventValueSelector(Shell parent) {
super(parent, SWT.DIALOG_TRIM | SWT.BORDER | SWT.APPLICATION_MODAL);
}
@@ -123,11 +123,11 @@ final class EventValueSelector extends Dialog {
}
loadValueDescriptor();
-
+
checkValidity();
// Set the dialog size.
- try {
+ try {
mShell.setMinimumSize(DLG_WIDTH, DLG_HEIGHT);
Rectangle r = mParent.getBounds();
// get the center new top left.
@@ -151,14 +151,14 @@ final class EventValueSelector extends Dialog {
if (!display.readAndDispatch())
display.sleep();
}
-
+
return mEditStatus;
}
-
+
OccurrenceDisplayDescriptor getDescriptor() {
return mDescriptor;
}
-
+
private void createUI() {
GridData gd;
@@ -167,10 +167,10 @@ final class EventValueSelector extends Dialog {
mShell.setText("Event Display Configuration");
mShell.setLayout(new GridLayout(2, false));
-
+
Label l = new Label(mShell, SWT.NONE);
l.setText("Event:");
-
+
mEventCombo = new Combo(mShell, SWT.DROP_DOWN | SWT.READ_ONLY);
mEventCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -183,12 +183,12 @@ final class EventValueSelector extends Dialog {
if (eventInfoMap.get(i) != null) {
String eventName = eventTagMap.get(i);
mEventCombo.add(eventName);
-
+
list.add(i);
}
}
mEventTags = list.toArray(new Integer[list.size()]);
-
+
mEventCombo.addSelectionListener(new SelectionAdapter() {
/* (non-Javadoc)
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
@@ -202,7 +202,7 @@ final class EventValueSelector extends Dialog {
l = new Label(mShell, SWT.NONE);
l.setText("Value:");
-
+
mValueCombo = new Combo(mShell, SWT.DROP_DOWN | SWT.READ_ONLY);
mValueCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
mValueCombo.addSelectionListener(new SelectionAdapter() {
@@ -288,24 +288,25 @@ final class EventValueSelector extends Dialog {
l = new Label(mShell, SWT.NONE);
l.setText("Filter Value:");
-
+
mFilterValue = new Text(mShell, SWT.BORDER | SWT.SINGLE);
mFilterValue.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
mFilterValue.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
if (mDescriptor.filterValueIndex != -1) {
// get the current selection in the event combo
int index = mEventCombo.getSelectionIndex();
-
+
if (index != -1) {
// match it to an event
int eventTag = mEventTags[index];
mDescriptor.eventTag = eventTag;
-
+
// get the EventValueDescription for this tag
EventValueDescription valueDesc = mLogParser.getEventInfoMap()
.get(eventTag)[mDescriptor.filterValueIndex];
-
+
// let the EventValueDescription convert the String value into an object
// of the proper type.
mDescriptor.filterValue = valueDesc.getObjectFromString(
@@ -315,14 +316,14 @@ final class EventValueSelector extends Dialog {
}
}
});
-
+
// add a separator spanning the 2 columns
-
+
l = new Label(mShell, SWT.SEPARATOR | SWT.HORIZONTAL);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
l.setLayoutData(gd);
-
+
// add a composite to hold the ok/cancel button, no matter what the columns size are.
Composite buttonComp = new Composite(mShell, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -353,7 +354,7 @@ final class EventValueSelector extends Dialog {
padding = new Composite(mShell, SWT.NONE);
padding.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
+
Button cancelButton = new Button(buttonComp, SWT.PUSH);
cancelButton.setText("Cancel");
cancelButton.setLayoutData(new GridData(GridData.CENTER));
@@ -371,8 +372,9 @@ final class EventValueSelector extends Dialog {
padding = new Composite(mShell, SWT.NONE);
padding.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
+
mShell.addListener(SWT.Close, new Listener() {
+ @Override
public void handleEvent(Event event) {
event.doit = true;
}
@@ -391,21 +393,21 @@ final class EventValueSelector extends Dialog {
// match it to an event
int eventTag = mEventTags[index];
mDescriptor.eventTag = eventTag;
-
+
// get the EventValueDescription for this tag
EventValueDescription[] values = mLogParser.getEventInfoMap().get(eventTag);
-
+
// fill the combo for the values
mValueCombo.removeAll();
if (values != null) {
if (mDescriptor instanceof ValueDisplayDescriptor) {
ValueDisplayDescriptor valueDescriptor = (ValueDisplayDescriptor)mDescriptor;
-
+
mValueCombo.setEnabled(true);
for (EventValueDescription value : values) {
mValueCombo.add(value.toString());
}
-
+
if (valueDescriptor.valueIndex != -1) {
mValueCombo.select(valueDescriptor.valueIndex);
} else {
@@ -426,7 +428,7 @@ final class EventValueSelector extends Dialog {
mSeriesCombo.add(value.getName());
mSeriesCombo.setEnabled(true);
mSeriesIndices.add(axisIndex);
-
+
if (mDescriptor.seriesValueIndex != -1 &&
mDescriptor.seriesValueIndex == axisIndex) {
selectionIndex = axisIndex;
@@ -441,7 +443,7 @@ final class EventValueSelector extends Dialog {
// +1 because we added another item at index 0
mSeriesCombo.select(selectionIndex + 1);
-
+
if (selectionIndex >= 0) {
mDisplayPidCheckBox.setSelection(mDescriptor.includePid);
mDisplayPidCheckBox.setEnabled(true);
@@ -453,7 +455,7 @@ final class EventValueSelector extends Dialog {
mDisplayPidCheckBox.setSelection(false);
mDisplayPidCheckBox.setEnabled(false);
}
-
+
// fill the filter combo
mFilterCombo.setEnabled(true);
mFilterCombo.removeAll();
@@ -461,7 +463,7 @@ final class EventValueSelector extends Dialog {
for (EventValueDescription value : values) {
mFilterCombo.add(value.toString());
}
-
+
// select the current filter
mFilterCombo.select(mDescriptor.filterValueIndex + 1);
mFilterMethodCombo.select(getFilterMethodIndex(mDescriptor.filterCompareMethod));
@@ -483,12 +485,12 @@ final class EventValueSelector extends Dialog {
} else {
disableSubCombos();
}
-
+
checkValidity();
}
/**
- *
+ *
*/
private void disableSubCombos() {
mValueCombo.removeAll();
@@ -498,14 +500,14 @@ final class EventValueSelector extends Dialog {
mSeriesCombo.removeAll();
mSeriesCombo.clearSelection();
mSeriesCombo.setEnabled(false);
-
+
mDisplayPidCheckBox.setEnabled(false);
mDisplayPidCheckBox.setSelection(false);
-
+
mFilterCombo.removeAll();
mFilterCombo.clearSelection();
mFilterCombo.setEnabled(false);
-
+
mFilterValue.setEnabled(false);
mFilterValue.setText("");
mFilterMethodCombo.setEnabled(false);
@@ -517,32 +519,32 @@ final class EventValueSelector extends Dialog {
// get the current selection in the value combo
int index = mValueCombo.getSelectionIndex();
valueDescriptor.valueIndex = index;
-
+
// for now set the built-in name
// get the current selection in the event combo
int eventIndex = mEventCombo.getSelectionIndex();
-
+
// match it to an event
int eventTag = mEventTags[eventIndex];
-
+
// get the EventValueDescription for this tag
EventValueDescription[] values = mLogParser.getEventInfoMap().get(eventTag);
valueDescriptor.valueName = values[index].getName();
-
+
checkValidity();
}
private void handleSeriesComboSelection() {
// get the current selection in the axis combo
int index = mSeriesCombo.getSelectionIndex();
-
+
// get the actual value index from the list.
int valueIndex = mSeriesIndices.get(index);
-
+
mDescriptor.seriesValueIndex = valueIndex;
-
+
if (index > 0) {
mDisplayPidCheckBox.setEnabled(true);
mDisplayPidCheckBox.setSelection(mDescriptor.includePid);
@@ -555,13 +557,13 @@ final class EventValueSelector extends Dialog {
private void handleFilterComboSelection() {
// get the current selection in the axis combo
int index = mFilterCombo.getSelectionIndex();
-
+
// decrement index by 1 since the item 0 means
// no filter (index = -1), and the rest is offset by 1
index--;
mDescriptor.filterValueIndex = index;
-
+
if (index != -1) {
mFilterValue.setEnabled(true);
mFilterMethodCombo.setEnabled(true);
@@ -574,12 +576,12 @@ final class EventValueSelector extends Dialog {
mFilterMethodCombo.setEnabled(false);
}
}
-
+
private void handleFilterMethodComboSelection() {
// get the current selection in the axis combo
int index = mFilterMethodCombo.getSelectionIndex();
CompareMethod method = CompareMethod.values()[index];
-
+
mDescriptor.filterCompareMethod = method;
}
@@ -609,7 +611,7 @@ final class EventValueSelector extends Dialog {
}
eventIndex++;
}
-
+
if (comboIndex == -1) {
mEventCombo.clearSelection();
} else {
@@ -619,7 +621,7 @@ final class EventValueSelector extends Dialog {
// get the event from the descriptor
handleEventComboSelection();
}
-
+
private void checkValidity() {
mOkButton.setEnabled(mEventCombo.getSelectionIndex() != -1 &&
(((mDescriptor instanceof ValueDisplayDescriptor) == false) ||
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/EditFilterDialog.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/EditFilterDialog.java
index 6cd44d0..0e302ce 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/EditFilterDialog.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/EditFilterDialog.java
@@ -149,6 +149,7 @@ public class EditFilterDialog extends Dialog {
mShell.setLayout(new GridLayout(1, false));
mShell.addListener(SWT.Close, new Listener() {
+ @Override
public void handleEvent(Event event) {
}
});
@@ -171,6 +172,7 @@ public class EditFilterDialog extends Dialog {
}
filterNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
filterNameText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
mName = filterNameText.getText().trim();
validate();
@@ -204,6 +206,7 @@ public class EditFilterDialog extends Dialog {
tagText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
tagText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
mTag = tagText.getText().trim();
validate();
@@ -228,6 +231,7 @@ public class EditFilterDialog extends Dialog {
}
pidText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
pidText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
mPid = pidText.getText().trim();
validate();
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterContentProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterContentProvider.java
index 2adbc4c..164f484 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterContentProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterContentProvider.java
@@ -24,9 +24,11 @@ import java.util.List;
* A JFace content provider for logcat filter list, used in {@link LogCatPanel}.
*/
public final class LogCatFilterContentProvider implements IStructuredContentProvider {
+ @Override
public void dispose() {
}
+ @Override
public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
}
@@ -35,6 +37,7 @@ public final class LogCatFilterContentProvider implements IStructuredContentProv
* @param model list of {@link LogCatFilter}'s
* @return array of {@link LogCatFilter} objects, or null.
*/
+ @Override
public Object[] getElements(Object model) {
if (model instanceof List<?>) {
return ((List<?>) model).toArray();
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterLabelProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterLabelProvider.java
index 4cc044d..59e236c 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterLabelProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterLabelProvider.java
@@ -24,6 +24,7 @@ import org.eclipse.swt.graphics.Image;
* {@link LogCatFilter}.
*/
public final class LogCatFilterLabelProvider extends LabelProvider implements ITableLabelProvider {
+ @Override
public Image getColumnImage(Object arg0, int arg1) {
return null;
}
@@ -34,6 +35,7 @@ public final class LogCatFilterLabelProvider extends LabelProvider implements IT
* @param index index of the column
* @return text to use in the column
*/
+ @Override
public String getColumnText(Object element, int index) {
if (!(element instanceof LogCatFilter)) {
return null;
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterSettingsDialog.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterSettingsDialog.java
index 955b291..f68ee05 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterSettingsDialog.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatFilterSettingsDialog.java
@@ -133,6 +133,7 @@ public final class LogCatFilterSettingsDialog extends TitleAreaDialog {
/* call validateDialog() whenever user modifies any text field */
ModifyListener m = new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent arg0) {
DialogStatus status = validateDialog();
mOkButton.setEnabled(status.valid);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageContentProvider.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageContentProvider.java
index 27b0456..bd7b520 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageContentProvider.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatMessageContentProvider.java
@@ -23,12 +23,15 @@ import org.eclipse.jface.viewers.Viewer;
* A JFace content provider for the LogCat log messages, used in the {@link LogCatPanel}.
*/
public final class LogCatMessageContentProvider implements IStructuredContentProvider {
+ @Override
public void dispose() {
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
+ @Override
public Object[] getElements(Object model) {
if (model instanceof LogCatMessageList) {
Object[] e = ((LogCatMessageList) model).toArray();
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java
index f910c14..43dddf1 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPanel.java
@@ -20,10 +20,10 @@ import com.android.ddmlib.DdmConstants;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.Log.LogLevel;
import com.android.ddmuilib.ITableFocusListener;
+import com.android.ddmuilib.ITableFocusListener.IFocusedTableActivator;
import com.android.ddmuilib.ImageLoader;
import com.android.ddmuilib.SelectionDependentPanel;
import com.android.ddmuilib.TableHelper;
-import com.android.ddmuilib.ITableFocusListener.IFocusedTableActivator;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -190,6 +190,7 @@ public final class LogCatPanel extends SelectionDependentPanel
private void initializePreferenceUpdateListeners() {
mPrefStore.addPropertyChangeListener(new IPropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
String changedProperty = event.getProperty();
@@ -248,6 +249,7 @@ public final class LogCatPanel extends SelectionDependentPanel
// Run this in a separate async thread to give the table some time to update after the
// setInput above.
Display.getDefault().asyncExec(new Runnable() {
+ @Override
public void run() {
scrollToLatestLog();
}
@@ -511,6 +513,7 @@ public final class LogCatPanel extends SelectionDependentPanel
mLiveFilterText.setMessage(DEFAULT_SEARCH_MESSAGE);
mLiveFilterText.setToolTipText(DEFAULT_SEARCH_TOOLTIP);
mLiveFilterText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent arg0) {
updateAppliedFilters();
}
@@ -610,6 +613,7 @@ public final class LogCatPanel extends SelectionDependentPanel
/* save messages to file in a different (non UI) thread */
Thread t = new Thread(new Runnable() {
+ @Override
public void run() {
try {
BufferedWriter w = new BufferedWriter(new FileWriter(fName));
@@ -620,6 +624,7 @@ public final class LogCatPanel extends SelectionDependentPanel
w.close();
} catch (final IOException e) {
Display.getDefault().asyncExec(new Runnable() {
+ @Override
public void run() {
MessageDialog.openError(Display.getCurrent().getActiveShell(),
"Unable to export selection to file.",
@@ -772,6 +777,7 @@ public final class LogCatPanel extends SelectionDependentPanel
// This is not strictly necessary, except that on WinXP, the rows showed up clipped. So
// we explicitly set it to be sure.
mViewer.getTable().addListener(SWT.MeasureItem, new Listener() {
+ @Override
public void handleEvent(Event event) {
event.height = event.gc.getFontMetrics().getHeight();
}
@@ -825,6 +831,7 @@ public final class LogCatPanel extends SelectionDependentPanel
// and see if the last item has been painted since the previous scroll event.
// If the last item has been painted, then we assume that we are at the bottom.
mViewer.getTable().addListener(SWT.PaintItem, new Listener() {
+ @Override
public void handleEvent(Event event) {
TableItem item = (TableItem) event.item;
TableItem[] items = mViewer.getTable().getItems();
@@ -1019,6 +1026,7 @@ public final class LogCatPanel extends SelectionDependentPanel
* @param receivedMessages list of messages from logcat
* Implements {@link ILogCatMessageEventListener#messageReceived()}.
*/
+ @Override
public void messageReceived(List<LogCatMessage> receivedMessages) {
refreshLogCatTable();
@@ -1043,6 +1051,7 @@ public final class LogCatPanel extends SelectionDependentPanel
private void refreshFiltersTable() {
Display.getDefault().asyncExec(new Runnable() {
+ @Override
public void run() {
if (mFiltersTableViewer.getTable().isDisposed()) {
return;
@@ -1071,6 +1080,7 @@ public final class LogCatPanel extends SelectionDependentPanel
}
private class LogCatTableRefresherTask implements Runnable {
+ @Override
public void run() {
if (mViewer.getTable().isDisposed()) {
return;
@@ -1127,20 +1137,24 @@ public final class LogCatPanel extends SelectionDependentPanel
final Table table = mViewer.getTable();
final IFocusedTableActivator activator = new IFocusedTableActivator() {
+ @Override
public void copy(Clipboard clipboard) {
copySelectionToClipboard(clipboard);
}
+ @Override
public void selectAll() {
table.selectAll();
}
};
table.addFocusListener(new FocusListener() {
+ @Override
public void focusGained(FocusEvent e) {
mTableFocusListener.focusGained(activator);
}
+ @Override
public void focusLost(FocusEvent e) {
mTableFocusListener.focusLost(activator);
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPidToNameMapper.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPidToNameMapper.java
index 1ce55bd..a4455d0 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPidToNameMapper.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatPidToNameMapper.java
@@ -16,11 +16,11 @@
package com.android.ddmuilib.logcat;
import com.android.ddmlib.AndroidDebugBridge;
+import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
+import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener;
import com.android.ddmlib.Client;
import com.android.ddmlib.ClientData;
import com.android.ddmlib.IDevice;
-import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener;
-import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener;
import java.util.HashMap;
import java.util.Map;
@@ -55,6 +55,7 @@ public class LogCatPidToNameMapper {
private IClientChangeListener constructClientChangeListener() {
return new IClientChangeListener() {
+ @Override
public void clientChanged(Client client, int changeMask) {
if ((changeMask & Client.CHANGE_NAME) == Client.CHANGE_NAME) {
ClientData cd = client.getClientData();
@@ -76,12 +77,15 @@ public class LogCatPidToNameMapper {
private IDeviceChangeListener constructDeviceChangeListener() {
return new IDeviceChangeListener() {
+ @Override
public void deviceDisconnected(IDevice device) {
}
+ @Override
public void deviceConnected(IDevice device) {
}
+ @Override
public void deviceChanged(IDevice device, int changeMask) {
if (changeMask == IDevice.CHANGE_CLIENT_LIST) {
updateClientList(device);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiver.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiver.java
index 584e14a..c9606f6 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiver.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiver.java
@@ -17,6 +17,7 @@
package com.android.ddmuilib.logcat;
import com.android.ddmlib.IDevice;
+import com.android.ddmlib.IShellOutputReceiver;
import com.android.ddmlib.Log;
import com.android.ddmlib.MultiLineReceiver;
@@ -86,6 +87,7 @@ public final class LogCatReceiver {
mCurrentLogCatOutputReceiver = new LogCatOutputReceiver();
Thread t = new Thread(new Runnable() {
+ @Override
public void run() {
/* wait while the device comes online */
while (!mCurrentDevice.isOnline()) {
@@ -131,6 +133,7 @@ public final class LogCatReceiver {
}
/** Implements {@link IShellOutputReceiver#isCancelled() }. */
+ @Override
public boolean isCancelled() {
return mIsCancelled;
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiverFactory.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiverFactory.java
index a545790..5617988 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiverFactory.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogCatReceiverFactory.java
@@ -37,13 +37,16 @@ public class LogCatReceiverFactory {
/** Private constructor: cannot instantiate. */
private LogCatReceiverFactory() {
AndroidDebugBridge.addDeviceChangeListener(new IDeviceChangeListener() {
+ @Override
public void deviceDisconnected(IDevice device) {
removeReceiverFor(device);
}
+ @Override
public void deviceConnected(IDevice device) {
}
+ @Override
public void deviceChanged(IDevice device, int changeMask) {
}
});
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java
index 80ed6e9..d60bae8 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/logcat/LogPanel.java
@@ -19,15 +19,15 @@ package com.android.ddmuilib.logcat;
import com.android.ddmlib.AdbCommandRejectedException;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.Log;
+import com.android.ddmlib.Log.LogLevel;
import com.android.ddmlib.MultiLineReceiver;
import com.android.ddmlib.ShellCommandUnresponsiveException;
import com.android.ddmlib.TimeoutException;
-import com.android.ddmlib.Log.LogLevel;
import com.android.ddmuilib.DdmUiPreferences;
import com.android.ddmuilib.ITableFocusListener;
+import com.android.ddmuilib.ITableFocusListener.IFocusedTableActivator;
import com.android.ddmuilib.SelectionDependentPanel;
import com.android.ddmuilib.TableHelper;
-import com.android.ddmuilib.ITableFocusListener.IFocusedTableActivator;
import com.android.ddmuilib.actions.ICommonAction;
import org.eclipse.jface.preference.IPreferenceStore;
@@ -233,6 +233,7 @@ public class LogPanel extends SelectionDependentPanel {
}
}
+ @Override
public boolean isCancelled() {
return isCancelled;
}
@@ -261,6 +262,7 @@ public class LogPanel extends SelectionDependentPanel {
mTabItem = tabItem;
}
+ @Override
public boolean isCancelled() {
return mDone;
}
@@ -301,7 +303,8 @@ public class LogPanel extends SelectionDependentPanel {
// update the tab
Display d = mFolders.getDisplay();
d.asyncExec(new Runnable() {
- public void run() {
+ @Override
+ public void run() {
mTabItem.setText(name);
}
});
@@ -437,6 +440,7 @@ public class LogPanel extends SelectionDependentPanel {
final Text filterText = new Text(bottom, SWT.SINGLE | SWT.BORDER);
filterText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
filterText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
updateFilteringWith(filterText.getText());
}
@@ -824,10 +828,12 @@ public class LogPanel extends SelectionDependentPanel {
private void addTableToFocusListener(final Table table) {
// create the activator for this table
final IFocusedTableActivator activator = new IFocusedTableActivator() {
+ @Override
public void copy(Clipboard clipboard) {
copyTable(clipboard, table);
}
+ @Override
public void selectAll() {
table.selectAll();
}
@@ -835,10 +841,12 @@ public class LogPanel extends SelectionDependentPanel {
// add the focus listener on the table to notify the global listener
table.addFocusListener(new FocusListener() {
+ @Override
public void focusGained(FocusEvent e) {
mGlobalListener.focusGained(activator);
}
+ @Override
public void focusLost(FocusEvent e) {
mGlobalListener.focusLost(activator);
}
@@ -946,9 +954,11 @@ public class LogPanel extends SelectionDependentPanel {
ControlListener listener = null;
if (mColumnMode == COLUMN_MODE_AUTO) {
listener = new ControlListener() {
+ @Override
public void controlMoved(ControlEvent e) {
}
+ @Override
public void controlResized(ControlEvent e) {
Rectangle r = t.getClientArea();
@@ -1045,6 +1055,7 @@ public class LogPanel extends SelectionDependentPanel {
// run sync as we need to update right now.
d.syncExec(new Runnable() {
+ @Override
public void run() {
mFolders.dispose();
mParent.pack(true);
@@ -1062,6 +1073,7 @@ public class LogPanel extends SelectionDependentPanel {
// run sync as we need to update right now.
d.syncExec(new Runnable() {
+ @Override
public void run() {
if (mFolders.isDisposed() == false) {
emptyTables();
@@ -1149,6 +1161,7 @@ public class LogPanel extends SelectionDependentPanel {
// run in sync because this will update the buffer start/end indices
display.asyncExec(new Runnable() {
+ @Override
public void run() {
asyncRefresh();
}