use of com.tencent.wstt.apt.ui.views.DevicesView in project GT by Tencent.
the class DumpHprofAction method run.
@Override
public void run() {
DevicesView deviceViewPart = (DevicesView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(DevicesView.ID);
TableItem[] selectData = deviceViewPart.sourcePkgTableViewer.getTable().getSelection();
if (selectData == null || selectData.length == 0) {
APTConsoleFactory.getInstance().APTPrint("进程列表为空");
return;
}
PkgInfo itemData = (PkgInfo) selectData[0].getData();
final String pkgName = itemData.contents[PkgInfo.NAME_INDEX];
DDMSUtil.dump(pkgName);
}
use of com.tencent.wstt.apt.ui.views.DevicesView in project GT by Tencent.
the class GCAction method run.
@Override
public void run() {
DevicesView deviceViewPart = (DevicesView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(DevicesView.ID);
TableItem[] selectData = deviceViewPart.sourcePkgTableViewer.getTable().getSelection();
if (selectData == null || selectData.length == 0) {
APTConsoleFactory.getInstance().APTPrint("进程列表为空");
return;
}
PkgInfo itemData = (PkgInfo) selectData[0].getData();
final String pkgName = itemData.contents[PkgInfo.NAME_INDEX];
DDMSUtil.gc(pkgName);
}
use of com.tencent.wstt.apt.ui.views.DevicesView in project GT by Tencent.
the class TestSenceUtil method update.
/**
* @Description 获取当前的测试设置
* @param @return
* @return boolean
* @throws
*/
public static boolean update() {
DevicesView dvPart = (DevicesView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(DevicesView.ID);
SettingView svPart = (SettingView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(SettingView.ID);
if (dvPart == null || svPart == null) {
return false;
}
/**
* 用这种方式获取测试参数的方式有很大的问题
* 比如用户设置完后,关闭了settings页面,然后点击开始测试
*
* 理想的方式应该是用编辑器实现,页面背后对应一个xml文件进行存储
*/
dvPart.getTargetPkgInfoList();
svPart.getTestArgs();
return true;
}
use of com.tencent.wstt.apt.ui.views.DevicesView in project GT by Tencent.
the class APTState method DealWithEventBefore_Display.
private void DealWithEventBefore_Display(APTEventEnum event) {
switch(event) {
case CONFIGRURE_OPER:
//清除曲线、统计表格
//APTConsoleFactory.getInstance().APTPrint("CONFIGRURE_OPER");
APTConsoleFactory.getInstance().APTPrint("clearChartAndTableData");
clearChartAndTableData();
APTConsoleFactory.getInstance().APTPrint("clearChartAndTableData ends");
break;
case START_OPER:
//清除曲线、统计表格列表清空
clearChartAndTableData();
break;
case STOP_OPER:
APTConsoleFactory.getInstance().APTPrint("展示状态下不可能接收STOP事件");
StatusBar.getInstance().showInfo("展示状态下不可能接收STOP事件");
break;
case OPENLOG_OPER:
//APTConsoleFactory.getInstance().APTPrint("OPENLOG_OPER");
clearChartAndTableData();
DevicesView deviceViewPart = (DevicesView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(DevicesView.ID);
if (deviceViewPart == null) {
APTConsoleFactory.getInstance().APTPrint("setUIEnable:Setting或者Device视图对象为空");
return;
}
//TODO:尽量使用UIThread,因为非UI的那种方式,会存在延时,导致删除
//延时这段时间发生的许多数据
deviceViewPart.clearTargetPkgTableViewerForUIThread();
break;
default:
APTConsoleFactory.getInstance().APTPrint("展示状态default");
StatusBar.getInstance().showInfo("展示状态default");
break;
}
APTConsoleFactory.getInstance().APTPrint("DealWithEventBefore_Display ends");
}
Aggregations