import org.tizen.dynamicanalyzer.ui.toolbar.setting.SettingDialog;
import org.tizen.dynamicanalyzer.util.Logger;
import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
+import org.tizen.dynamicanalyzer.workbench.LayoutManager;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonRenderer;
import org.tizen.dynamicanalyzer.widgets.combo.DACustomCombo;
import org.tizen.dynamicanalyzer.widgets.combo.DACustomComboSelectionListener;
import org.tizen.dynamicanalyzer.widgets.combo.DACustomComboTooltip;
+import org.tizen.dynamicanalyzer.widgets.da.base.ProgressDialog;
import org.tizen.dynamicanalyzer.widgets.timer.IAlarm;
import org.tizen.dynamicanalyzer.widgets.timer.TimerClock;
import org.tizen.sdblib.service.FileEntry;
// toolbar buttons by id
private Map<Integer, DACustomButton> buttons = new HashMap<Integer, DACustomButton>();
+ // Progress dialog used by appcombo
+ private ProgressDialog progressDlg = null;
+
private static final int TIMER_WIDTH = 122;
public void create(Composite parent) {
}
private void onAppSelected(PackageInfo pkg) {
+ Display.getDefault().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
+ progressDlg = new ProgressDialog(shell, LayoutManager.getBaseComposite());
+ progressDlg.setProgressStyle(ProgressDialog.PROGRESS_STYLE_CANCEL);
+ progressDlg.setProgressMessage(AnalyzerLabels.DLG_COPYING_BINARY);
+ progressDlg.setProgressInfo(AnalyzerLabels.DLG_PLEASE_WAIT);
+ progressDlg.setCancelListener(new DACustomButtonClickEventListener() {
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ Logger.warning("Progress dialog canceled");
+ }
+ });
+ progressDlg.open();
+ }
+ });
+
+ progressDlg.setValues("Getting process information", 30);
if (pkg != null) {
List<String> binPaths = new ArrayList<String>();
}
}
+ progressDlg.setValues("Getting binary from device", 70);
if (!binPaths.isEmpty()) {
DAResult hr = new DAResult(ErrorCode.ERR_BIN_INFO_GET_FAIL);
try {
}
}
}
+ progressDlg.setValues("Done", 100);
+ if (progressDlg != null) {
+ Display.getDefault().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ progressDlg.close();
+ }
+ });
+ }
}
/**********************************************************************************************