From 60b393cd9e5a0184ba603e11787b64b21c72205b Mon Sep 17 00:00:00 2001 From: Siva Velusamy Date: Thu, 6 Dec 2012 11:20:48 -0800 Subject: Add sysinfo panel to monitor/ADT Change-Id: If75df27e17f5ad866b4a73a8422444f82c4c7ac0 --- .../com.android.ide.eclipse.ddms/plugin.properties | 1 + .../com.android.ide.eclipse.ddms/plugin.xml | 7 ++++++ .../com/android/ide/eclipse/ddms/Perspective.java | 3 +++ .../ide/eclipse/ddms/views/SysInfoView.java | 29 ++++++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/SysInfoView.java (limited to 'eclipse') diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.properties b/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.properties index 6fd8e50..f4eb2b0 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.properties +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.properties @@ -10,6 +10,7 @@ view.name.File_Explorer = File Explorer view.name.Emulator_Control = Emulator Control view.name.Allocation_Tracker = Allocation Tracker view.name.Network_Stats = Network Statistics +view.name.SysInfo = System Information perspective.name.DDMS = DDMS page.name.DDMS = DDMS page.name.LogCat = LogCat diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml b/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml index 861fcff..4738ba9 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/plugin.xml @@ -87,6 +87,13 @@ name="%view.name.Network_Stats" restorable="true"> + + diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/Perspective.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/Perspective.java index 4f40f4f..c98e9ca 100644 --- a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/Perspective.java +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/Perspective.java @@ -23,6 +23,7 @@ import com.android.ide.eclipse.ddms.views.FileExplorerView; import com.android.ide.eclipse.ddms.views.HeapView; import com.android.ide.eclipse.ddms.views.LogCatView; import com.android.ide.eclipse.ddms.views.NetworkStatisticsView; +import com.android.ide.eclipse.ddms.views.SysInfoView; import com.android.ide.eclipse.ddms.views.ThreadView; import org.eclipse.ui.IFolderLayout; @@ -62,6 +63,7 @@ public class Perspective implements IPerspectiveFactory { folder.addView(NetworkStatisticsView.ID); folder.addView(FileExplorerView.ID); folder.addView(EmulatorControlView.ID); + folder.addView(SysInfoView.ID); layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //$NON-NLS-1$ layout.addPerspectiveShortcut("org.eclipse.debug.ui.DebugPerspective"); //$NON-NLS-1$ @@ -74,6 +76,7 @@ public class Perspective implements IPerspectiveFactory { layout.addShowViewShortcut(LogCatView.ID); layout.addShowViewShortcut(ThreadView.ID); layout.addShowViewShortcut(NetworkStatisticsView.ID); + layout.addShowViewShortcut(SysInfoView.ID); layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS); diff --git a/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/SysInfoView.java b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/SysInfoView.java new file mode 100644 index 0000000..e493925 --- /dev/null +++ b/eclipse/plugins/com.android.ide.eclipse.ddms/src/com/android/ide/eclipse/ddms/views/SysInfoView.java @@ -0,0 +1,29 @@ +package com.android.ide.eclipse.ddms.views; + +import com.android.ddmuilib.SysinfoPanel; + +import org.eclipse.swt.widgets.Composite; + +public class SysInfoView extends SelectionDependentViewPart { + public static final String ID = "com.android.ide.eclipse.ddms.views.SysInfoView"; //$NON-NLS-1$ + + private SysinfoPanel mSysInfoPanel; + + @Override + public void createPartControl(Composite parent) { + mSysInfoPanel = new SysinfoPanel(); + mSysInfoPanel.createPanel(parent); + setSelectionDependentPanel(mSysInfoPanel); + } + + @Override + public void setFocus() { + mSysInfoPanel.setFocus(); + } + + @Override + public void dispose() { + mSysInfoPanel.dispose(); + super.dispose(); + } +} -- cgit v1.1