package org.tizen.dynamicanalyzer.common;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
import org.tizen.dynamicanalyzer.nl.UserErrorWarningLabels;
import org.tizen.dynamicanalyzer.project.PackageInfo;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.workbench.SingletonFocusManager;
public class AutoStartManager implements Runnable {
if (null == pkgInfo) {
Display.getDefault().syncExec(new Runnable() {
public void run() {
- Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog warning = new DADialog(shell, SWT.NONE);
String name = appName;
if (name.length() > APPNAME_LENGTH) {
name = appName.substring(0, APPNAME_LENGTH - 1) + "...";//$NON-NLS-1$
}
- warning.setMessage(name + CommonConstants.SPACE
+ UIAction.showWarning(name + CommonConstants.SPACE
+ UserErrorWarningLabels.ERROR_NONEXIST_APPLICATION);
- warning.setIcon(ImageResources.DIALOG_WARNING_ICON);
- warning.open();
Toolbar.INSTANCE.setAllControlState(true);
}
import org.tizen.dynamicanalyzer.util.Logger;
public enum DAResult {
- SUCCESS(0, "Success!"),
- ERR_EXCEPTION_OCCURRED(-1, "Excpetion occurred "),
-
- // error from target (3 digits) ( -100 ~ -999 )
+ SUCCESS(0, "Success!"), ERR_EXCEPTION_OCCURRED(-1, "Excpetion occurred "),
+
+ // error that is not shown to the user (3 digits) ( -100 ~ -999 )
ERR_INVALID_VERSION(-100, "not supported version "),
ERR_REMOTE_PORT_GET_FAILED(-101, "remote port get failed!!"),
ERR_CONTROL_SOCKET_CREATION_FAIL(-102, "control socket creation is failed "),
ERR_SDB_PUSH_FAILED(-203, "sdb push returns null"),
ERR_READELF_SIZE_GET_FAILED(-204, "readelf size get failed"),
ERR_READELF_UPLOAD_FAILED(-205, "readelf file size is different!!"),
- ERR_DEVICE_IS_NULL(-301, "Current device is not available"),
- ERR_DEVICE_IS_OFFLINE(-302, "current device is offline"),
- ERR_SELECTED_APP_IS_NULL(-401, "selected app is null"),
- ERR_MSG_START_FAIL(-501, "Current application is not available"),
ERR_MSG_STOP_FAIL(-502, "stop message is not ok"),
ERR_MSG_RUNTIME_FAIL(-503, "runtime message is not ok"),
- ERR_MSG_SEND_FAIL(-504, "Communicator is not running"),
ERR_TARGET_INFO_GET_FAIL(-505, "target info get fail..."),
ERR_KEEP_ALIVE(-506, "keep alive message ack fail..."),
ERR_BIN_INFO_GET_FAIL(-507, "binary info get fail..."),
ERR_RECEIVE_ACK_FAIL(-508, "receiving ack message fail..."),
- ERR_BY_SECURITY_REASON(-601, "error by security reason"),
ERR_DA_IS_EXIT(-901, "Dynamic Analyzer is closing"),
-
- // error for DA host (4 digits) ( -1000 ~ -9999 )
+
+ // error that is shown to the user (4 digits) ( -1000 ~ -9999 )
ERR_OUT_OF_MEMORY(-1001, UserErrorWarningLabels.ERROR_OUT_OF_MEMORY),
ERR_NO_DEVICE(-1010, UserErrorWarningLabels.ERROR_DEVICE_NOT_FOUND),
ERR_DISCONNECTED(-1011, UserErrorWarningLabels.ERROR_DEVICE_CONNECTION),
ERR_STOP_DATA_CHANNEL(-2004, UserErrorWarningLabels.ERROR_INTERNAL_REASON),
ERR_STOP_MESSAGE_PARSER(-2005, UserErrorWarningLabels.ERROR_INTERNAL_REASON),
ERR_STOP_LOG_PARSER(-2006, UserErrorWarningLabels.ERROR_INTERNAL_REASON),
+ ERR_MSG_START_FAIL(-2007, UserErrorWarningLabels.ERROR_START_TRACE_FAILED),
+ ERR_MSG_SEND_FAIL(-2008, UserErrorWarningLabels.ERROR_INTERNAL_REASON),
ERR_CONTINUITY_BROKEN(-2010, UserErrorWarningLabels.WARNING_OVERHEAD_EXPLODE),
ERR_WRONG_MESSAGE_FORMAT(-2011, UserErrorWarningLabels.ERROR_INTERNAL_REASON),
ERR_DATA_SOCKET_CLOSED(-2012, UserErrorWarningLabels.ERROR_CONNECTION_CLOSED),
ERR_UNKNOWN(-9999, UserErrorWarningLabels.ERROR_BY_UNKNOWN_REASON);
-
+
private final int errNo;
private final String errMsg;
private String detailMsg;
package org.tizen.dynamicanalyzer.common;
import org.tizen.dynamicanalyzer.callback.IExecutionCallback;
-import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.handlers.ExitHandler;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
@Override
public void execute() {
- if (DACommunicator.isRunning()) {
- DACommunicator.stopTrace();
- }
-
AnalyzerUtil.executeCommand(ExitHandler.ID);
}
result.setDetailMessage(e.getMessage());
}
} else if (null == device) {
- result = DAResult.ERR_DEVICE_IS_NULL;
+ result = DAResult.ERR_NO_DEVICE;
} else if (!isOnline(device)) {
- result = DAResult.ERR_DEVICE_IS_OFFLINE;
+ result = DAResult.ERR_DISCONNECTED;
} else {
result = DAResult.ERR_UNKNOWN;
}
if (curDev != null) {
return curDev.getCommunicator().sendHostMessage(curDev, msgid);
} else {
- return DAResult.ERR_DEVICE_IS_NULL;
+ return DAResult.ERR_NO_DEVICE;
}
}
import java.util.Collections;
import java.util.List;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.path.PathManager;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.UserErrorWarningLabels;
import org.tizen.dynamicanalyzer.project.AppInfo;
import org.tizen.dynamicanalyzer.project.PackageInfo;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.swap.platform.BinarySettingData;
import org.tizen.dynamicanalyzer.swap.platform.BinarySettingManager;
import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.utils.RpmUtil;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.workbench.SingletonFocusManager;
public class IDECommunicator implements Runnable {
}
private void errorMessageBox() {
- popupMessage(AnalyzerLabels.IDE_DA_COMMUNICATION_ERROR_MESSAGE);
+ UIAction.showWarning(AnalyzerLabels.IDE_DA_COMMUNICATION_ERROR_MESSAGE);
}
public synchronized static void startIDECommunicatorThread() {
sendMessageToIDE(sendMessageString(IDE_DA_COMMUNICATION_TYPE_1,
IDE_DA_COMMUNICATION_TYPE_1_RECORD, CommonConstants.EMPTY));
SingletonFocusManager.setFocusToDA();
- popupMessage(AnalyzerLabels.RE_TRACE_FORM_IDE);
+ UIAction.showWarning(AnalyzerLabels.RE_TRACE_FORM_IDE);
return false;
}
return true;
if (srcrpm != null) {
binaryData.setSourceRpmPath(srcrpm);
}
-
+
addBinPath.add(binPath);
addBinData.add(binaryData);
}
DeviceInfo device = DACommunicator.getDeviceByName(deviceName);
Global.setCurrentDeviceInfo(device);
if (device == null) {
- popupMessage(UserErrorWarningLabels.ERROR_DEVICE_CONNECTION);
+ UIAction.showWarning(UserErrorWarningLabels.ERROR_DEVICE_CONNECTION);
Toolbar.INSTANCE.setAllControlState(true);
return;
}
} else if (projectType.equals(PROJECT_TYPE_LIBRARY)) {
if (localPackagePathList.size() == 0) {
Logger.error("rpm package for library is not set");
- popupMessage(UserErrorWarningLabels.ERROR_LIBTRACE_START + CommonConstants.NEW_LINE
- + UserErrorWarningLabels.ERROR_RPM_NOT_FOUND);
+ UIAction.showWarning(UserErrorWarningLabels.ERROR_LIBTRACE_START
+ + CommonConstants.NEW_LINE + UserErrorWarningLabels.ERROR_RPM_NOT_FOUND);
Toolbar.INSTANCE.setAllControlState(true);
return;
}
String errormsg = binarySettingWithRPM(mainrpm, debugrpm, srcrpm);
if (errormsg != null) {
Logger.error("error during binary setting wit rpm");
- popupMessage(errormsg);
+ UIAction.showWarning(errormsg);
Toolbar.INSTANCE.setAllControlState(true);
return;
}
} else {
// there is no appid
Logger.error("there is no appid for library tracing");
- popupMessage(UserErrorWarningLabels.ERROR_LIBTRACE_START
+ UIAction.showWarning(UserErrorWarningLabels.ERROR_LIBTRACE_START
+ CommonConstants.NEW_LINE
+ UserErrorWarningLabels.ERROR_NO_APPID_FOR_LAUNCHPAD);
Toolbar.INSTANCE.setAllControlState(true);
if (name.length() > APPNAME_LENGTH) {
name = appName.substring(0, APPNAME_LENGTH - 1) + "...";//$NON-NLS-1$
}
- popupMessage(name + CommonConstants.SPACE + postfix);
- }
-
- private void popupMessage(final String message) {
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog warning = new DADialog(shell, SWT.NONE);
- warning.setMessage(message);
- warning.setIcon(ImageResources.DIALOG_WARNING_ICON);
- warning.open();
- }
- });
+ UIAction.showWarning(name + CommonConstants.SPACE + postfix);
}
public synchronized static Boolean isOpenWelcomeDlg() {
import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.project.Project;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.swap.communicator.DataChannelThread;
import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.widgets.da.base.ProgressDialog;
import org.tizen.dynamicanalyzer.widgets.progress.Progress;
import org.tizen.dynamicanalyzer.workbench.LayoutManager;
// if error occurred, show the error dialog
if (!result.isSuccess()) {
- showError(result);
+ UIAction.showWarning(result);
}
// set shortcut and toolbar UI as DA state
throw new InterruptedException();
}
}
-
- private void showError(DAResult result) {
- // open error dialog
- final DAResult fResult = result;
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog warning = new DADialog(shell, SWT.NONE);
- warning.setMessage(fResult.getMessage() + "(" + fResult.getErrorNumber() + ")");
- warning.setIcon(ImageResources.DIALOG_WARNING_ICON);
- warning.open();
- }
- });
- }
}
import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.project.Project;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.swap.communicator.DataChannelThread;
import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.widgets.da.base.ProgressDialog;
import org.tizen.dynamicanalyzer.widgets.progress.Progress;
import org.tizen.dynamicanalyzer.workbench.LayoutManager;
private void testCancel() throws InterruptedException {
// do nothing
}
-
- @SuppressWarnings("unused")
- private void showError(DAResult result) {
- // open error dialog
- final DAResult fResult = result;
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog warning = new DADialog(shell, SWT.NONE);
- warning.setMessage(fResult.getMessage() + "(" + fResult.getErrorNumber() + ")");
- warning.setIcon(ImageResources.DIALOG_WARNING_ICON);
- warning.open();
- }
- });
- }
}
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.project.BinaryInfo;
import org.tizen.dynamicanalyzer.project.Project;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.swap.callstack.BaseCallstackManager;
import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackInserter;
import org.tizen.dynamicanalyzer.ui.toolbar.opentrace.OpenTraceProgressManager;
import org.tizen.dynamicanalyzer.ui.userinterface.UIDataManager;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.widgets.combo.DACustomCombo;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
public class OpenTraceHandler extends AbstractHandler {
if (!bsuccess) {
OpenTraceProgressManager.getInstance().closeOpenTraceDialog(
AnalyzerLabels.OPEN_TRACE_PROGRESS_LOADING_FAILED);
- createWarningDialog(AnalyzerLabels.OPEN_TRACE_PROGRESS_VERSION_INVALID_REMOVE);
+ UIAction.showWarning(AnalyzerLabels.OPEN_TRACE_PROGRESS_VERSION_INVALID_REMOVE);
CommonAction.clear();
return null;
}
} else {
OpenTraceProgressManager.getInstance().closeOpenTraceDialog(
AnalyzerLabels.OPEN_TRACE_PROGRESS_LOADING_FAILED);
- createWarningDialog(AnalyzerLabels.OPEN_TRACE_PROGRESS_INVALID_REMOVE);
+ UIAction.showWarning(AnalyzerLabels.OPEN_TRACE_PROGRESS_INVALID_REMOVE);
CommonAction.clear();
return null;
}
Toolbar.INSTANCE.setTime(project.getTotalStopTime());
Toolbar.INSTANCE.setDeviceComboText(project.getDevice());
Toolbar.INSTANCE.setAppComboText(project.getAppName());
-
+
Toolbar.INSTANCE.setAllControlState(true);
OpenTraceProgressManager.getInstance().setProgressPercent(
AnalyzerLabels.OPEN_TRACE_PROGRESS_LOADING, percent += 3);
// possibility of extensions - network, efl, db, etc...
ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
.getProfileDataMakerByPid(pid);
- int profilingDataID = (Integer) profilingData.get(ProfilingDataDBTable.COLUMN.PROFILINGDATAID.index);
+ int profilingDataID = (Integer) profilingData
+ .get(ProfilingDataDBTable.COLUMN.PROFILINGDATAID.index);
byte type = (Byte) profilingData.get(ProfilingDataDBTable.COLUMN.TYPE.index);
int exCount = (Integer) profilingData
.get(ProfilingDataDBTable.COLUMN.EXCOUNT.index);
int size = profilingChilds.size();
for (int i = 0; i < size; i++) {
List<Object> data = profilingChilds.get(i);
- int parentID = (Integer) data.get(ProfilingChildDataDBTable.COLUMN.PROFILINGDATAID.index);
+ int parentID = (Integer) data
+ .get(ProfilingChildDataDBTable.COLUMN.PROFILINGDATAID.index);
int pid = (Integer) data.get(ProfilingChildDataDBTable.COLUMN.PID.index);
@SuppressWarnings("unchecked")
- List<Integer> childSeqList =
- (List<Integer>) data.get(ProfilingChildDataDBTable.COLUMN.CHILDSEQARRAY.index);
-
+ List<Integer> childSeqList = (List<Integer>) data
+ .get(ProfilingChildDataDBTable.COLUMN.CHILDSEQARRAY.index);
+
ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
.getProfileDataMakerByPid(pid);
ProfilingData parent = profiler.getProfilingDataMap().get(parentID);
}
return isSuccess;
}
-
- private void createWarningDialog(String message) {
- final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- final DADialog dialog = new DADialog(shell, SWT.NONE);
- dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
- dialog.setMessage(message);
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- dialog.open();
- }
- });
- }
}
package org.tizen.dynamicanalyzer.handlers;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.dynamicanalyzer.common.DAResult;
import org.tizen.dynamicanalyzer.nl.SummaryLabels;
+import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.ui.info.screenshot.ScreenshotView;
import org.tizen.dynamicanalyzer.ui.page.ScreenshotTabComposite;
import org.tizen.dynamicanalyzer.ui.summary.SummaryPage;
import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakView;
import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
+import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
public class UIAction {
+ public static final int DEFAULT_WARNING_WIDTH = 446;
+ public static final int DEFAULT_WARNING_HEIGHT = 153;
/**
* Reset UI. Disable lastest button in screenshot view, and change leak view title.
}
});
}
+
+ public static void showWarning(final String message, final int width, final int height) {
+ Display.getDefault().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
+ DADialog dialog = new DADialog(shell, SWT.NONE, width, height);
+ dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
+ dialog.setMessage(message);
+ dialog.open();
+ }
+ });
+ }
+
+ public static void showWarning(final DAResult result, final int width, final int height) {
+ showWarning(result.getMessage() + " (" + result.getErrorNumber() + ")", width, height);
+ }
+
+ public static void showWarning(final String message) {
+ Display.getDefault().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
+ DADialog dialog = new DADialog(shell, SWT.NONE);
+ dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
+ dialog.setMessage(message);
+ dialog.open();
+ }
+ });
+ }
+
+ public static void showWarning(final DAResult result) {
+ showWarning(result.getMessage() + " (" + result.getErrorNumber() + ")");
+ }
}
import org.tizen.dynamicanalyzer.common.SymbolManager.SourceLine;
import org.tizen.dynamicanalyzer.communicator.IDECommunicator;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.project.AppInfo;
import org.tizen.dynamicanalyzer.project.BinaryInfo;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.util.Logger;
import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
public class TableTooltipListener implements Listener {
}
if (IDECommunicator.isConnected() == false) {
- createErrorPopup(AnalyzerLabels.IDE_NOT_LAUNCHED);
+ UIAction.showWarning(AnalyzerLabels.IDE_NOT_LAUNCHED);
return;
}
String filePath = getSourcePath(gridItem, sl);
}
}
- private void createErrorPopup(String message) {
- Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog warning = new DADialog(shell, SWT.NONE);
- warning.setMessage(message);
- warning.setIcon(ImageResources.DIALOG_WARNING_ICON);
- warning.open();
- }
-
private void createErrorTooltip(int x, int y, int errno) {
// Creates tooltip.
Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
public static String ERROR_BY_UNKNOWN_REASON;
public static String ERROR_OUT_OF_MEMORY;
+
+ public static String ERROR_START_TRACE_FAILED;
public static String WARNING_PATH_NOT_FOUND;
public static String WARNING_FILE_NOT_FOUND;
ERROR_OUT_OF_MEMORY=Out of memory in Dynamic Analyzer.\nIf you want to use more memory, increase the -xmx value\nof the dynamic-analyzer.ini file in Dynamic Analyzer installed directory.\n
+ERROR_START_TRACE_FAILED=Cannot start trace.\nCurrent application may not be available for trace.
+
WARNING_PATH_NOT_FOUND=Path cannot be found.
WARNING_FILE_NOT_FOUND=File cannot be found.
import java.util.Map;
import java.util.regex.Pattern;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands;
import org.tizen.dynamicanalyzer.control.ApplistManager;
import org.tizen.dynamicanalyzer.control.IProgress;
import org.tizen.dynamicanalyzer.handlers.ReplayManager;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.model.AddrSymbolPair;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
-import org.tizen.dynamicanalyzer.nl.UserErrorWarningLabels;
import org.tizen.dynamicanalyzer.project.AppInfo;
import org.tizen.dynamicanalyzer.project.BinaryInfo;
import org.tizen.dynamicanalyzer.project.DeviceStatusInfo;
import org.tizen.dynamicanalyzer.project.PackageInfo;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.swap.channel.control.ApplicationInst;
import org.tizen.dynamicanalyzer.swap.channel.control.FunctionInst;
import org.tizen.dynamicanalyzer.swap.channel.control.RunTimeConfiguration;
import org.tizen.dynamicanalyzer.util.ByteUtil;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.sdblib.exception.SdbCommandRejectedException;
import org.tizen.sdblib.exception.TimeoutException;
import org.tizen.sdblib.service.SyncResult;
DAResult result = CommunicatorUtils.foward(devInfo.getIDevice(),
CommunicatorUtils.LOCAL_PORT, remotePort);
Logger.debug(result.toString());
- if (!DAResult.SUCCESS.equals(result)) {
+ if (!result.isSuccess()) {
Logger.debug(devInfo.getIDevice().getSerialNumber()
+ " port fowarding failed and remove this device");
return DAResult.ERR_REMOTE_PORT_GET_FAILED;
public DAResult startTrace(IProgress progress) throws InterruptedException {
DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev == null) {
- return DAResult.ERR_DEVICE_IS_NULL;
+ return DAResult.ERR_NO_DEVICE;
}
DACommunicator.setRunning(true);
DeviceInfo curDevice = Global.getCurrentDeviceInfo();
if (curDevice == null) {
- return DAResult.ERR_DEVICE_IS_NULL;
+ return DAResult.ERR_NO_DEVICE;
}
if (AnalyzerConstants.RUNNING_PROCESS.equals(selectedPkg.getPackageId())) {
Logger.exception(e);
} finally {
if (!becomeSuper) {
- return DAResult.ERR_BY_SECURITY_REASON;
+ return DAResult.ERR_BY_SECURITY;
}
}
Global.setCurrentConfiguration(rt);
return DAResult.SUCCESS;
} else {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog dialog = new DADialog(shell, SWT.NONE, 550, 153);
- dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
- dialog.setMessage("Configuration failed..");
- dialog.open();
- }
- });
- return DAResult.ERR_MSG_RUNTIME_FAIL;
+ return DAResult.ERR_CONFIG_FAILED;
}
}
public DAResult sendSWAPMessage(int messageId, List<BinarySettingData> settings) {
DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev == null) {
- return DAResult.ERR_DEVICE_IS_NULL;
+ return DAResult.ERR_NO_DEVICE;
}
byte[] msg = new byte[0];
result = pullTheFile(targetPath, localBinaryPath);
if (result.isSuccess()) {
binInfo.setTempBinaryPath(localBinaryPath);
- } else if (result.equals(DAResult.ERR_BY_SECURITY_REASON)) {
+ } else if (result.equals(DAResult.ERR_BY_SECURITY)) {
// popup by security reason
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog dialog = new DADialog(shell, SWT.NONE, 480, 153);
- dialog.setIcon(ImageResources.DIALOG_ERROR_ICON);
- dialog.setMessage(UserErrorWarningLabels.ERROR_BY_SECURITY_REASON);
- dialog.open();
- }
- });
-
+ UIAction.showWarning(result, 480, 153);
continue;
}
} else {
result = pullTheFile(targetPath, localBinaryPath);
if (result.isSuccess()) {
binInfo.setTempBinaryPath(localBinaryPath);
- } else if (result.equals(DAResult.ERR_BY_SECURITY_REASON)) {
+ } else if (result.equals(DAResult.ERR_BY_SECURITY)) {
// popup by security reason
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog dialog = new DADialog(shell, SWT.NONE, 480, 153);
- dialog.setIcon(ImageResources.DIALOG_ERROR_ICON);
- dialog.setMessage(UserErrorWarningLabels.ERROR_BY_SECURITY_REASON);
- dialog.open();
- }
- });
-
+ UIAction.showWarning(result, 480, 153);
continue;
}
} else {
@Override
public DAResult sendHostMessage(DeviceInfo dev, int msgid) {
if (dev == null) {
- return DAResult.ERR_DEVICE_IS_NULL;
+ return DAResult.ERR_NO_DEVICE;
}
DAResult res = DAResult.ERR_MSG_SEND_FAIL;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.WidgetLabels;
import org.tizen.dynamicanalyzer.project.Project;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
import org.tizen.dynamicanalyzer.widgets.da.base.DAText;
e.gc.setForeground(ColorResources.DIALOG_SUNKEN_1);
e.gc.drawLine(rect.x, rect.y, rect.x + rect.width, rect.y);
e.gc.setForeground(ColorResources.DIALOG_SUNKEN_2);
- e.gc.drawLine(rect.x, rect.y + 1, rect.x + rect.width,
- rect.y + 1);
+ e.gc.drawLine(rect.x, rect.y + 1, rect.x + rect.width, rect.y + 1);
}
});
return true;
}
-
+
public String getSaveFileName() {
return saveFileName;
}
} else if (CommonUtil.isLinux()) {
splitSourcePath = sourcePath.split("\\/"); //$NON-NLS-1$
} else {
- final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog dialog = new DADialog(shell, SWT.NONE); // FIXME
- dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
- dialog.setMessage(AnalyzerLabels.OS_WARNING);
- dialog.open();
+ UIAction.showWarning(AnalyzerLabels.OS_WARNING);
return null;
}
if (null == splitSourcePath) {
return null;
}
- String saveFileName = new String(
- splitSourcePath[splitSourcePath.length - 1]);
+ String saveFileName = new String(splitSourcePath[splitSourcePath.length - 1]);
if (null == saveFileName || saveFileName.isEmpty()) {
return null;
}
private boolean checkValidFileName(String str) {
if (str == null
|| str.contains("\\") //$NON-NLS-1$
- || str.contains(CommonConstants.SLASH)
- || str.contains(CommonConstants.COLON)
+ || str.contains(CommonConstants.SLASH) || str.contains(CommonConstants.COLON)
|| str.contains(CommonConstants.ASTERISK)
|| str.contains("\\?") || str.contains("\"") //$NON-NLS-1$ //$NON-NLS-2$
|| str.contains("<") || str.contains(">") //$NON-NLS-1$ //$NON-NLS-2$
import org.tizen.dynamicanalyzer.control.ApplistManager;
import org.tizen.dynamicanalyzer.handlers.CommandAction;
import org.tizen.dynamicanalyzer.handlers.ReplayManager;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.project.AppInfo;
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.DADialog;
import org.tizen.dynamicanalyzer.widgets.timer.IAlarm;
import org.tizen.dynamicanalyzer.widgets.timer.TimerClock;
import org.tizen.sdblib.IDevice;
public enum Toolbar {
INSTANCE;
-
+
public static final int START_BUTTON = 0;
public static final int SAVE_BUTTON = 1;
public static final int OPEN_BUTTON = 2;
public DACustomCombo getAppCombo() {
return appCombo;
}
-
+
private void addToolbarListeners() {
deviceCombo.addSelectionListener(new DACustomComboSelectionListener() {
Object result = dialog.open();
if (null != result) {
if (!CommandAction.save(dialog.getSaveFileName())) {
- DADialog warninglog = new DADialog(shell, SWT.NONE);
- warninglog.setIcon(ImageResources.DIALOG_WARNING_ICON);
- warninglog.setMessage(AnalyzerLabels.SAVE_FAILED);
- warninglog.open();
+ UIAction.showWarning(AnalyzerLabels.SAVE_FAILED);
}
button.setButtonEnabled(false);
import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.path.PathManager;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.WidgetLabels;
import org.tizen.dynamicanalyzer.project.Project;
import org.tizen.dynamicanalyzer.resources.ColorResources;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
public class RepalyEditSaveDialog extends DAMessageBox {
} else if (CommonUtil.isLinux()) {
splitSourcePath = sourcePath.split("\\/"); //$NON-NLS-1$
} else {
- final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog dialog = new DADialog(shell, SWT.NONE); // FIXME
- dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
- dialog.setMessage(AnalyzerLabels.OS_WARNING);
- dialog.open();
+ UIAction.showWarning(AnalyzerLabels.OS_WARNING);
return null;
}
if (null == splitSourcePath) {
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.communicator.IDECommunicator;
import org.tizen.dynamicanalyzer.handlers.CommonAction;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
import org.tizen.dynamicanalyzer.nl.WidgetLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.ui.toolbar.setting.data.SettingDataManager;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.widgets.da.base.DAMessageBox;
import org.tizen.dynamicanalyzer.widgets.da.view.DABaseComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
private DACustomButton okButton = null;
private DACustomButton cancelButton = null;
private boolean isApply = false;
-
+
private SettingDialogTemplatePage templatesPage = null;
private SettingDialogOptionPage optionPage = null;
-
+
private DATabComposite tabView = null;
private Composite buttonContentsComp = null;
-
+
public SettingDialog(Shell parentShell) {
super(parentShell);
- SettingDataManager.getInstance(); // read setting information file
+ SettingDataManager.getInstance(); // read setting information file
}
private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
isApply = true;
doApply();
doRun();
- shell.close(); // close dialog
+ shell.close(); // close dialog
} else {
doWarningMessage();
}
}
};
-
+
private DACustomButtonClickEventListener cancelButtonListener = new DACustomButtonClickEventListener() {
@Override
isApply = true;
doRevert();
doRun();
- shell.close(); // close dialog
+ shell.close(); // close dialog
} else {
doWarningMessage();
}
if (DACommunicator.isRunning() == false) {
// add & remove tab view page
SettingDialogManager.getInstance().updateTabViewPage();
-
+
// add & remove (timeline) chart
SettingDialogManager.getInstance().updateChartList();
-
+
// write setting data
SettingDataManager.getInstance().applySettingData();
}
Composite selectedComposite = tabView.getTopComposite();
if (!(selectedComposite instanceof SettingDialogBinarySettingsPage)) {
if (DACommunicator.isRunning() == false) {
- CommonAction.configure();
+ CommonAction.configure();
}
}
}
-
+
private void doWarningMessage() {
- // fail message box
- Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog dialog = new DADialog(shell, SWT.NONE, 550, 153);
- dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
- dialog.setMessage(ConfigureLabels.SETTING_WARNING_MESSAGE_SETTING_INVALID_INPUT_VALUE);
- dialog.open();
+ UIAction.showWarning(ConfigureLabels.SETTING_WARNING_MESSAGE_SETTING_INVALID_INPUT_VALUE,
+ 550, 153);
}
protected boolean run() {
shell.setLayout(new FormLayout());
shell.setText(AnalyzerLabels.SETTING_TITLE);
shell.setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
-
+
// content composite
Composite contentsComp = new Composite(shell, SWT.NONE);
FormLayout compLayout = new FormLayout();
compData.right = new FormAttachment(100, 0);
compData.bottom = new FormAttachment(100, -49);
contentsComp.setLayoutData(compData);
-
+
// check exist setting file
if (SettingDataManager.getInstance().isExistSettingFile() == false) {
Label label = new Label(contentsComp, SWT.NONE);
opened = false;
ShortCutManager.getInstance().setEnabled(!opened);
}
- });
+ });
opened = true;
ShortCutManager.getInstance().setEnabled(!opened);
-
+
shell.open();
return true;
}
-
+
// tab view
tabView = new DATabComposite(contentsComp, SWT.DOUBLE_BUFFERED);
tabView.setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
compData.bottom = new FormAttachment(100, 0);
tabView.setLayoutData(compData);
- templatesPage = new SettingDialogTemplatePage(
- tabView.getContentComposite(), SWT.NONE);
+ templatesPage = new SettingDialogTemplatePage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(templatesPage, false);
SettingDialogManager.getInstance().setConfigDlg(this);
- optionPage = new SettingDialogOptionPage(
- tabView.getContentComposite(), SWT.NONE);
+ optionPage = new SettingDialogOptionPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(optionPage, false);
// check platform SDK (show binary setting page)
if (AnalyzerManager.isPlatformSDK()) {
createBinarySettingPage();
}
-
+
// button composite
buttonContentsComp = new Composite(shell, SWT.NONE);
compLayout = new FormLayout();
buttonContentsComp.setLayout(compLayout);
- buttonContentsComp.setBackground(ColorResources.CONFIGURATION_BUTTON_COVER_BACKGROUND_COLOR);
+ buttonContentsComp
+ .setBackground(ColorResources.CONFIGURATION_BUTTON_COVER_BACKGROUND_COLOR);
compData = new FormData();
compData.top = new FormAttachment(contentsComp, 0);
compData.left = new FormAttachment(0, 0);
compData.right = new FormAttachment(100, 0);
compData.bottom = new FormAttachment(100, 0);
- buttonContentsComp.setLayoutData(compData);
+ buttonContentsComp.setLayoutData(compData);
buttonContentsComp.addPaintListener(new PaintListener() {
@Override
Composite comp = (Composite) e.widget;
Rectangle rect = comp.getClientArea();
e.gc.setForeground(ColorResources.SETTING_SUNKEN_LINE_1);
- e.gc.drawLine(0, 0, rect.width-1, 0);
+ e.gc.drawLine(0, 0, rect.width - 1, 0);
e.gc.setForeground(ColorResources.SETTING_SUNKEN_LINE_2);
- e.gc.drawLine(0, 1, rect.width-1, 1);
+ e.gc.drawLine(0, 1, rect.width - 1, 1);
}
});
templatesPage.updateTotalOverheadRange();
}
});
-
-
+
cancelButton = new DAButton(buttonContentsComp, SWT.NONE);
cancelButton.addClickListener(cancelButtonListener);
cancelButton.setText(WidgetLabels.CANCEL);
buttonData.width = 100;
buttonData.height = 28;
cancelButton.setLayoutData(buttonData);
-
+
okButton = new DAButton(buttonContentsComp, SWT.NONE);
okButton.addClickListener(okButtonListener);
okButton.setText(WidgetLabels.OK);
opened = false;
ShortCutManager.getInstance().setEnabled(!opened);
}
-
-
- });
-
+
+ });
+
opened = true;
ShortCutManager.getInstance().setEnabled(!opened);
-
+
shell.addShellListener(shellListener);
shell.open();
return true;
}
-
+
private void createBinarySettingPage() {
DABaseComposite binarySettings = new SettingDialogBinarySettingsPage(
tabView.getContentComposite(), SWT.NONE);
tabView.addView(binarySettings, false);
-
// binarySettings tab is selected, the close button will be shown.
// ok and cancel button is hidden
binarySettings.addListener(SWT.Show, new Listener() {
IDECommunicator.getWaitingWelcomeDlg().notifyAll();
}
}
-
+
private ShellListener shellListener = new ShellListener() {
@Override
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.DAResult;
import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.path.PathManager;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
+import org.tizen.dynamicanalyzer.handlers.UIAction;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
-import org.tizen.dynamicanalyzer.nl.UserErrorWarningLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.swap.platform.BinarySettingData;
import org.tizen.dynamicanalyzer.swap.platform.BinarySettingManager;
import org.tizen.dynamicanalyzer.swap.platform.ui.BinarySettingProcessor;
import org.tizen.dynamicanalyzer.ui.toolbar.setting.data.SettingDataManager;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.util.Logger;
-import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
-import org.tizen.dynamicanalyzer.widgets.da.base.DADialog;
import org.tizen.dynamicanalyzer.widgets.da.base.WarningDialog;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
public void handleClickEvent(DACustomButton button) {
DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev == null) {
- showDeviceWarning();
+ UIAction.showWarning(DAResult.ERR_NO_DEVICE, 400, 150);
} else {
DeviceExplorerDialog dialog = new DeviceExplorerDialog(getShell(), true);
// dialog.setFilter(".so");
public void handleClickEvent(DACustomButton button) {
DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev == null) {
- showDeviceWarning();
+ UIAction.showWarning(DAResult.ERR_NO_DEVICE, 400, 150);
return;
}
return;
}
}
-
+
cleanRow();
}
};
-
+
private void cleanRow() {
List<BinarySettingData> binaries = BinarySettingManager.getInstance()
.getBinarySettingList();
public String getDebugRootPath() {
return rootPath;
}
-
- private void showDeviceWarning() {
- final Shell shell = WorkbenchUtil.getWorkbenchWindow().getShell();
- DADialog dialog = new DADialog(shell, SWT.NONE, 400, 150);
- dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
- dialog.setMessage(UserErrorWarningLabels.ERROR_DEVICE_NOT_FOUND);
- dialog.open();
- }
}