pkgInfo.getMainApp().setLocalPackagePath(localPackagePathList);
}
} else if (projectType.equals(PROJECT_TYPE_LIBRARY)) {
+ // TODO : UX improvement, and more test in unrooted device
+
if (localPackagePathList.size() == 0) {
Logger.error("rpm package for library is not set");
UIAction.showWarning(UserErrorWarningLabels.ERROR_LIBTRACE_START
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.DAResult;
+import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.nl.SummaryLabels;
import org.tizen.dynamicanalyzer.resources.ImageResources;
import org.tizen.dynamicanalyzer.setting.SettingConstants;
}
public static void showWarning(final DAResult result) {
- showWarning(result.getMessage() + " (" + result.getErrorNumber() + ")");
+ showWarning(result.getMessage() + CommonConstants.SPACE + CommonConstants.OPEN_BRACKET
+ + result.getErrorNumber() + CommonConstants.CLOSE_BRACKET);
+ }
+
+ public static void showWarning(final Shell shell, final String message) {
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ DADialog dialog = new DADialog(shell, SWT.NONE);
+ dialog.setIcon(ImageResources.DIALOG_WARNING_ICON);
+ dialog.setMessage(message);
+ dialog.open();
+ }
+ });
+ }
+
+ public static void showWarning(final Shell shell, final DAResult result) {
+ showWarning(shell, result.getMessage() + CommonConstants.SPACE
+ + CommonConstants.OPEN_BRACKET + result.getErrorNumber()
+ + CommonConstants.CLOSE_BRACKET);
}
public static List<String> getPageNames() {
ERROR_UNSUPPORTED_PROTOCOL=This version of platform of the device is not supported.\nPlease update the platform of device and retry.
ERROR_BY_SECURITY_REASON=This operation is not allowed due to security reason.
-ERROR_APP_SELECT_BY_SECURITY=Selected application cannot be traced due to security reason.
+ERROR_APP_SELECT_BY_SECURITY=Selected application cannot be traced due to security reason.
ERROR_NONEXIST_APPLICATION=does not exist in device.\nPlease check that the application has been installed successfully.
ERROR_UNSUPPORTED_APPLICATION=is unsupported application.
public void handleClickEvent(DACustomButton button) {
DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev == null) {
- UIAction.showWarning(new DAResult(ErrorCode.ERR_NO_DEVICE), 400, 150);
+ UIAction.showWarning(getShell(), new DAResult(ErrorCode.ERR_NO_DEVICE));
+ } else if (!curDev.isRootAvailable()) {
+ UIAction.showWarning(getShell(), new DAResult(ErrorCode.ERR_BY_SECURITY));
} else {
DeviceExplorerDialog dialog = new DeviceExplorerDialog(getShell(), true);
// dialog.setFilter(".so");
public void handleClickEvent(DACustomButton button) {
DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev == null) {
- UIAction.showWarning(new DAResult(ErrorCode.ERR_NO_DEVICE), 400, 150);
+ UIAction.showWarning(getShell(), new DAResult(ErrorCode.ERR_NO_DEVICE));
+ return;
+ }
+
+ if (!curDev.isRootAvailable()) {
+ UIAction.showWarning(getShell(), new DAResult(ErrorCode.ERR_BY_SECURITY));
return;
}