*/
package org.tizen.common.connection.ui;
-import java.io.IOException;
-
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
-import org.tizen.common.TizenPlatformConstants;
import org.tizen.common.connection.ConnectionPlugin;
-import org.tizen.common.util.log.Logger;
import org.tizen.sdblib.FileListingService.FileEntry;
import org.tizen.sdblib.IDevice;
-import org.tizen.sdblib.MultiLineReceiver;
public class TizenRemoteFileDialog {
public enum TizenRemoteFileDialogResult {
private Tree pathTree;
private TreeViewer pathTreeViewer;
private Composite upper;
+ private boolean enableMultiSelection = false;
TizenRemoteFileContentProvider remoteContentProvider = null;
createControls(shell);
}
+ public TizenRemoteFileDialog(Shell parent, String dlgTitle, IDevice device, boolean isDirOnly, String defaultPath, boolean enableMultiSelection) {
+ this(parent, dlgTitle, device, isDirOnly, defaultPath);
+ this.enableMultiSelection = enableMultiSelection;
+ }
+
public TizenRemoteFileDialogResult open() {
shell.open();
runEventLoop(shell);
private void createPathTree(Composite pParent) {
// if add SWT.VIRTUAL, horizontal scrol is not shown in case of Linux
- pathTree = new Tree(pParent, SWT.MULTI | SWT.FULL_SELECTION);
+ int style = SWT.FULL_SELECTION;
+ if (enableMultiSelection) {
+ style = style | SWT.MULTI;
+ }
+ pathTree = new Tree(pParent, style);
+
setTreeLayout(pathTree);
}
display.update();
}
- private void setDefaultPath(final String corePath) {
- if (corePath == null) {
- defaultPath = "/";
- }
-
- String command = "ls " + TizenPlatformConstants.PRIVATE_PLATFORM_CORE_PATH + "/*/files/core.* 2&>/dev/null | wc -l";
-
- try {
- this.device.executeShellCommand(command, new MultiLineReceiver() {
- @Override
- public void processNewLines(String[] lines) {
- defaultPath = "0".equals(lines[0]) ? corePath : TizenPlatformConstants.PRIVATE_PLATFORM_CORE_PATH;
- }
- });
- } catch (IOException e) {
- Logger.error("Problem occurred while executing command '" + command + "'", e.getMessage(), e);
+ private void setDefaultPath(final String basePath) {
+ if (basePath == null) {
+ this.defaultPath = "/";
+ } else {
+ this.defaultPath = basePath;
}
}
}
public static final String PKGTYPE_DEB = "DEB";
// Definitions for debugging
- public static final String PUBICL_PLATFORM_CORE_PATH = "/opt/bs/core";
- public static final String PRIVATE_PLATFORM_CORE_PATH = "/opt/share/hidden_storage/SLP_debug";
+ public static final String DEBUG_COREFILE_PATH;
+ public static final String DEBUG_COREFILE_EXTENSION;
+ public static final String DEBUG_COREFILE_EXTRACT_COMMAND;
+ public static final String DEBUG_COREFILE_EXTRACT_TEMP_PATH;
+
public static final String GDBSERVER_CMD;
public static final String GDBSERVER_PLATFORM_CMD;
public static final String ATTACH_OPTION = " --attach ";
APP_INSTALL_PATH = "/opt/apps";
APP_ICON_INSTALL_PATH = "shared/res";
TEMPORARY_PKG_PATH = "/opt/apps/PKGS/";
+ DEBUG_COREFILE_PATH = "/opt/usr/share/crash/dump";
+ DEBUG_COREFILE_EXTENSION = "coredump";
+ DEBUG_COREFILE_EXTRACT_COMMAND = "tar -xvf %s -C %s --wildcards --no-anchored '%s'";
+ DEBUG_COREFILE_EXTRACT_TEMP_PATH = "/tmp";
}
}