*/
package org.tizen.dynamicanalyzer.common;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
}
return settingPath;
}
-
+
public static String getRPMPath() {
String rpmPath = AnalyzerPaths.TIZEN_SDK_DATA_PATH;
if (null != rpmPath) {
}
return rpmPath;
}
-
+
public static String getLogPath() {
String logPath = AnalyzerPaths.TIZEN_SDK_DATA_PATH;
if (null != logPath) {
}
}
}
+
+ public static String getRootStrapsPath() {
+ return AnalyzerPaths.TIZEN_ROOT_PATH + File.separator + "platforms"
+ + File.separator + getPlatform() + File.separator
+ + "rootstraps";
+ }
}
int remotePort = -1;
// add error check
System.out.print("Getting Port Progress \n ");
- int ii = 0;
while (count < PORT_WAIT_TIME) {
try {
execShellCommand(device,
+ remotePort);
break;
} catch (NumberFormatException e) {
- System.out.print("=");
+ System.out.print("=");
}
}
count++;
"table_cell_font", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
// mac 11\r
\r
+ public static final Font EXPLORER_CELL_FONT = getFont(\r
+ "table_cell_font", resizeDefaultFont(15, 3));//$NON-NLS-1$\r
+ \r
+ \r
public static final Font DETAIL_INFO_FONT = getFont(\r
"detail_info_font", resizeDefaultFont(8, 3));//$NON-NLS-1$\r
// mac 11\r
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.SymbolManager;
-import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
import org.tizen.dynamicanalyzer.swap.logparser.SWAPLogParser;
-import org.tizen.dynamicanalyzer.swap.channel.control.BinaryInfo;
import org.tizen.dynamicanalyzer.swap.model.data.LogData;
import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData;
import org.tizen.dynamicanalyzer.swap.model.data.ProfileData;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData;
-import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackItem;
+import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfileDataMaker;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
package org.tizen.dynamicanalyzer.swap.platform.ui;
+import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.tizen.dynamicanalyzer.common.DesignConstants;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.swap.platform.ui.DeviceExplorer.DeviceExplorerDilaog;
+import org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer.FileExplorerCasvalDialog;
import org.tizen.dynamicanalyzer.ui.widgets.DAButton;
import org.tizen.dynamicanalyzer.ui.widgets.DAMessageBox;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
private Text debugPackage = null;
private DAButton findButton = null;
+ private DAButton findPackageButton = null;
private DAButton okButton = null;
private DAButton cancelButton = null;
@Override
public void handleClickEvent(DACustomButton button) {
- FileExplorerDialog dialog = new FileExplorerDialog(shell);
+ DeviceExplorerDilaog dialog = new DeviceExplorerDilaog(shell);
Object result = dialog.open();
if (result != null) {
FileEntry entry = (FileEntry) result;
}
};
+ private DACustomButtonClickEventListener findDebugButtonListener = new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ FileExplorerCasvalDialog dialog = new FileExplorerCasvalDialog(shell);
+ Object result = dialog.open();
+ if (result != null) {
+ File file = (File) result;
+ debugPackage.setText(file.getAbsolutePath());
+ }
+ }
+ };
private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() {
@Override
data.top = new FormAttachment(label, 5);
data.left = new FormAttachment(0, 12);
data.height = 24;
- data.width = 350;
+ data.width = 330;
binary.setLayoutData(data);
binary.setBackground(ColorResources.WHITE);
binary.addKeyListener(binaryKeyListener);
data.top = new FormAttachment(label, 4);
data.left = new FormAttachment(binary, 5);
data.height = 30;
- data.width = 50;
+ data.width = 80;
findButton.setLayoutData(data);
- findButton.setText("Find");
+ findButton.setText("Find file");
findButton.addClickListener(findButtonListener);
// Label sourceLabel = new Label(shell, SWT.TRANSPARENT);
data.width = 150;
debugLabel.setLayoutData(data);
debugLabel.setForeground(ColorResources.BLACK);
- debugLabel.setText("Debug package Path");
+ debugLabel.setText("Debug directory path");
debugLabel.setBackground(ColorResources.DIALOG_BG_UPPER);
debugPackage = new Text(shell, SWT.SINGLE);
data.top = new FormAttachment(debugLabel, 5);
data.left = new FormAttachment(0, 12);
data.height = 26;
- data.width = 350;
+ data.width = 330;
debugPackage.setLayoutData(data);
debugPackage.setBackground(ColorResources.WHITE);
debugPackage.setText(debutStr);
}
});
+ findPackageButton = new DAButton(shell, SWT.NONE);
+ data = new FormData();
+ data.top = new FormAttachment(debugLabel, 4);
+ data.left = new FormAttachment(debugPackage, 5);
+ data.height = 30;
+ data.width = 80;
+ findPackageButton.setLayoutData(data);
+ findPackageButton.setText("Find dir");
+ findPackageButton.addClickListener(findDebugButtonListener);
+
Composite buttonComp = new Composite(shell, SWT.NONE);
buttonComp.setLayout(new FormLayout());
buttonComp.setBackground(ColorResources.DIALOG_BG_LOWER);
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableEmptyCellRenderer;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.receiver.FileEntryFactory;
import org.tizen.sdblib.service.FileEntry;
import org.tizen.sdblib.service.FileEntryType;
+import org.tizen.sdblib.util.FileEntryUtil;
public class DAFileExplorer extends Composite {
protected Grid table;
String name = getDeviceSerialWithName(root);
item.setText(name);
item.setData(root);
-
table.update();
}
--- /dev/null
+package org.tizen.dynamicanalyzer.swap.platform.ui.DeviceExplorer;
+
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.nebula.widgets.grid.GridColumn;
+import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.resources.FontResources;
+import org.tizen.dynamicanalyzer.swap.platform.ui.ExplorerUtil;
+import org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer.DAFileExplorerEmptyCellRenderer;
+import org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer.DAFileExplorerTableRenderer;
+import org.tizen.dynamicanalyzer.ui.widgets.DAButton;
+import org.tizen.dynamicanalyzer.ui.widgets.DAGrid;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.service.FileEntry;
+
+public class DeviceExplorer extends Composite {
+ protected Grid table = null;
+ protected Text inputText = null;
+ protected DACustomButton goButton = null;
+ protected Label info = null;
+
+ private IDevice device = null;
+ private FileEntry root = null;
+ private FileEntry current = null;
+ private FileEntry selected = null;
+
+ private SelectionListener tableSelectionListener = new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ GridItem[] selections = table.getSelection();
+ GridItem selection = selections[0];
+ FileEntry file = (FileEntry) selection
+ .getData(ExplorerUtil.DATA_FIEL_KEY);
+ System.out.println("Selected : " + file.getFullPath());
+ selected = file;
+ inputText.setText(selected.getFullPath());
+ inputText.setBackground(ColorResources.WHITE);
+ info.setText(CommonConstants.EMPTY);
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+ };
+
+ private MouseListener tableMouseListener = new MouseListener() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ if (selected.isDirectory() || selected.isRoot()) {
+ current = selected;
+ updateData();
+ }
+ }
+ };
+
+ private DACustomButtonClickEventListener goButtonClickListener = new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ String path = inputText.getText();
+ if (null == path || path.isEmpty()) {
+ System.out.println("path must not empty");
+ inputText.setBackground(ColorResources.RED);
+ info.setText("Empty path");
+ return;
+ }
+
+ if (!path.contains(root.getFullPath())) {
+ System.out.println("Out of root range");
+ inputText.setBackground(ColorResources.RED);
+ info.setText("Out of root range");
+ return;
+ }
+
+ FileEntry file = device.getFileEntry(path);
+ if (null == file || (!file.isDirectory() && !file.isRoot())) {
+ System.out.println("target path is invalid");
+ inputText.setBackground(ColorResources.RED);
+ info.setText("Invalid path");
+ return;
+ }
+ inputText.setBackground(ColorResources.WHITE);
+ current = file;
+ updateData();
+ }
+ };
+
+ public DeviceExplorer(Composite parent) {
+ super(parent, SWT.NONE);
+ this.setLayout(new FormLayout());
+ this.setBackground(ColorResources.DIALOG_BG_UPPER);
+
+ inputText = new Text(this, SWT.SINGLE);
+ FormData data = new FormData();
+ data.top = new FormAttachment(0, 5);
+ data.left = new FormAttachment(0, 5);
+ data.right = new FormAttachment(100, -80);
+ data.height = 18;
+ inputText.setLayoutData(data);
+
+ goButton = new DAButton(this, SWT.NONE);
+ data = new FormData();
+ data.top = new FormAttachment(0, 5);
+ data.left = new FormAttachment(inputText, 5);
+ data.right = new FormAttachment(100, -5);
+ data.height = 22;
+ goButton.setLayoutData(data);
+ goButton.setText("Go");
+ goButton.addClickListener(goButtonClickListener);
+
+ // Label label = new Label(this, SWT.TRANSPARENT);
+ // data = new FormData();
+ // data.top = new FormAttachment(inputText, 5);
+ // data.left = new FormAttachment(0, 20);
+ // data.height = 18;
+ // data.width = 70;
+ // label.setLayoutData(data);
+ // label.setText(CommonConstants.EMPTY);
+ // label.setBackground(ColorResources.DIALOG_BG_UPPER);
+ // label.setFont(FontResources.TABLE_CELL_FONT);
+
+ info = new Label(this, SWT.TRANSPARENT);
+ data = new FormData();
+ data.top = new FormAttachment(inputText, 10);
+ data.left = new FormAttachment(75, 0);
+ data.right = new FormAttachment(100, -6);
+ data.height = 18;
+ info.setLayoutData(data);
+ info.setText(CommonConstants.EMPTY);
+ info.setBackground(ColorResources.DIALOG_BG_UPPER);
+ info.setFont(FontResources.TABLE_CELL_FONT);
+
+ table = new DAGrid(this, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
+ table.setBackground(ColorResources.TABLE_CONTENTS_NORMAL);
+ table.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR);
+ // table.setFont(FontResources.EXPLORER_CELL_FONT);
+ setColumns();
+ table.setEmptyCellRenderer(new DAFileExplorerEmptyCellRenderer());
+ table.setItemHeight(40);
+
+ data = new FormData();
+ data.top = new FormAttachment(info, 5);
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.bottom = new FormAttachment(100, 0);
+ table.setLayoutData(data);
+
+ table.addSelectionListener(tableSelectionListener);
+ table.addMouseListener(tableMouseListener);
+ }
+
+ public void setColumns() {
+ GridColumn preColumn = new GridColumn(table, SWT.NONE);
+ preColumn.setCellRenderer(new DAFileExplorerTableRenderer());
+ preColumn.setHeaderRenderer(new DATableHeaderRenderer());
+ preColumn.setText("File");
+ preColumn.setWidth(20);
+
+ GridColumn fileColumn = new GridColumn(table, SWT.NONE);
+ fileColumn.setCellRenderer(new DAFileExplorerTableRenderer());
+ fileColumn.setHeaderRenderer(new DATableHeaderRenderer());
+ fileColumn.setText("File");
+ fileColumn.setWidth(395);
+
+ GridColumn postColumn = new GridColumn(table, SWT.NONE);
+ postColumn.setCellRenderer(new DAFileExplorerTableRenderer());
+ postColumn.setHeaderRenderer(new DATableHeaderRenderer());
+ postColumn.setText("File");
+ postColumn.setWidth(20);
+ }
+
+ public void updateData() {
+ if (null == current) {
+ if (null == root) {
+ System.out.println("Root is empty");
+ return;
+ }
+ current = root;
+ }
+ table.removeAll();
+ inputText.setText(current.getFullPath());
+
+ if (!current.getFullPath().equals(root.getFullPath())) {
+ GridItem parentItem = new GridItem(table, SWT.NONE);
+ parentItem.setText(1, ExplorerUtil.PARENT_STR);
+ parentItem.setData(ExplorerUtil.DATA_FIEL_KEY, current.getParent());
+ }
+ FileEntry[] children = current.getChildren();
+ if (null != children) {
+ int size = children.length;
+ for (int i = 0; i < size; i++) {
+ FileEntry child = children[i];
+ GridItem item = new GridItem(table, SWT.NONE);
+ item.setText(1, child.getName());
+ item.setData(ExplorerUtil.DATA_FIEL_KEY, child);
+ }
+ }
+
+ table.update();
+ }
+
+ public void setRoot(String r) {
+ if (null != device && null != r && !r.isEmpty()) {
+ FileEntry rootDir = device.getFileEntry(r);
+ if (null == rootDir
+ || (!rootDir.isDirectory() && !rootDir.isRoot())) {
+ System.out.println("root path is invalid");
+ return;
+ } else {
+ root = rootDir;
+ }
+ }
+ }
+
+ public Grid getTable() {
+ return table;
+ }
+
+ public FileEntry getSelection() {
+ GridItem[] selections = table.getSelection();
+ if (selections.length > 0) {
+ GridItem selection = selections[0];
+ if (selection.getText().equals(ExplorerUtil.PARENT_STR)) {
+ return null;
+ }
+ FileEntry entry = (FileEntry) selection
+ .getData(ExplorerUtil.DATA_FIEL_KEY);
+ if (!entry.isDirectory() && !entry.isRoot()) {
+ return entry;
+ } else {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ public void setDevice(IDevice dev) {
+ this.device = dev;
+ }
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.swap.platform.ui.DeviceExplorer;
+
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.dynamicanalyzer.common.DesignConstants;
+import org.tizen.dynamicanalyzer.communicator.DACommunicator;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.swap.platform.ui.ExplorerUtil;
+import org.tizen.dynamicanalyzer.ui.widgets.DAButton;
+import org.tizen.dynamicanalyzer.ui.widgets.DAMessageBox;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
+import org.tizen.sdblib.service.FileEntry;
+
+public class DeviceExplorerDilaog extends DAMessageBox {
+ private DeviceExplorer explorer = null;
+ private DACustomButton okButton = null;
+ private DACustomButton cancelButton = null;
+
+ public DeviceExplorerDilaog(Shell parentShell) {
+ super(parentShell);
+ shell.setLayout(new FormLayout());
+ shell.setSize(446, 600);
+ shell.setBackground(ColorResources.DIALOG_BG_UPPER);
+ shell.setText("Select binary");
+
+ explorer = new DeviceExplorer(shell);
+ FormData data = new FormData();
+ data.top = new FormAttachment(0, 17);
+ data.left = new FormAttachment(0, 6);
+ data.height = 476;
+ data.width = 434;
+ explorer.setLayoutData(data);
+ explorer.setDevice(DACommunicator.getSelectedDevice().getIDevice());
+ explorer.setRoot(DACommunicator.getSelectedDevice().getIDevice()
+ .getRoot().getFullPath());
+ explorer.updateData();
+
+ Composite buttonComp = new Composite(shell, SWT.NONE);
+ buttonComp.setLayout(new FormLayout());
+ buttonComp.setBackground(ColorResources.DIALOG_BG_LOWER);
+
+ buttonComp.addPaintListener(new PaintListener() {
+
+ @Override
+ public void paintControl(PaintEvent e) {
+ Composite comp = (Composite) e.widget;
+ Rectangle rect = comp.getClientArea();
+ 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);
+ }
+ });
+
+ FormData compData = new FormData();
+ compData.top = new FormAttachment(explorer, 20);
+ compData.left = new FormAttachment(0, 0);
+ compData.right = new FormAttachment(100, 0);
+ compData.bottom = new FormAttachment(100, 0);
+ buttonComp.setLayoutData(compData);
+
+ okButton = new DAButton(buttonComp, SWT.NONE);
+ data = new FormData();
+ data.top = new FormAttachment(0, 11);
+ data.left = new FormAttachment(50, -DesignConstants.DA_BUTTON_WIDTH - 4);
+ data.height = DesignConstants.DA_BUTTON_HEIGHT;
+ data.width = DesignConstants.DA_BUTTON_WIDTH;
+ okButton.setLayoutData(data);
+ okButton.setText(AnalyzerLabels.OK);
+ okButton.addClickListener(new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ result = explorer.getSelection();
+ if (null != result) {
+ shell.dispose();
+ }
+ }
+ });
+
+ cancelButton = new DAButton(buttonComp, SWT.NONE);
+ data = new FormData();
+ data.top = new FormAttachment(0, 11);
+ data.left = new FormAttachment(50, 4);
+ data.height = DesignConstants.DA_BUTTON_HEIGHT;
+ data.width = DesignConstants.DA_BUTTON_WIDTH;
+ cancelButton.setLayoutData(data);
+ cancelButton.setText(AnalyzerLabels.CANCEL);
+ cancelButton.addClickListener(new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ shell.dispose();
+ }
+ });
+
+ explorer.getTable().addMouseListener(new MouseListener() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ Grid table = (Grid) e.widget;
+ GridItem[] items = (GridItem[]) table.getSelection();
+ if (null == items || items.length == 0) {
+ return;
+ }
+ GridItem item = items[0];
+ FileEntry entry = (FileEntry) item
+ .getData(ExplorerUtil.DATA_FIEL_KEY);
+
+ if (!entry.isDirectory() && !entry.isRoot()) {
+ result = entry;
+ shell.dispose();
+ }
+ }
+ });
+ }
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.swap.platform.ui;
+
+import java.io.File;
+
+public class ExplorerUtil {
+ public static String PARENT_STR = "..";
+
+ public static int TYPE_DIR = 0;
+ public static int TYPE_FILE = 1;
+ public static int TYPE_HIDDEN = 2;
+
+ public static String DATA_FIEL_KEY = "file";
+
+ public static int getType(File file) {
+ if (file.isDirectory()) {
+ return TYPE_DIR;
+ } else if (file.isFile()) {
+ return TYPE_FILE;
+ } else if (file.isHidden()) {
+ return TYPE_HIDDEN;
+ } else {
+ System.out.println("error : file type error");
+ return -1;
+ }
+ }
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer;
+
+import java.io.File;
+
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.nebula.widgets.grid.GridColumn;
+import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.resources.FontResources;
+import org.tizen.dynamicanalyzer.swap.platform.ui.ExplorerUtil;
+import org.tizen.dynamicanalyzer.ui.widgets.DAButton;
+import org.tizen.dynamicanalyzer.ui.widgets.DAGrid;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
+
+public class DAFileExplorerCasval extends Composite {
+
+ protected Grid table = null;
+ protected Text inputText = null;
+ protected DACustomButton goButton = null;
+ protected Label info = null;
+
+ private File root = null;
+ private File current = null;
+ private File selected = null;
+
+ private SelectionListener tableSelectionListener = new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ GridItem[] selections = table.getSelection();
+ GridItem selection = selections[0];
+ File file = (File) selection.getData(ExplorerUtil.DATA_FIEL_KEY);
+ System.out.println("Selected : " + file.getAbsolutePath());
+ selected = file;
+ inputText.setText(selected.getAbsolutePath());
+ inputText.setBackground(ColorResources.WHITE);
+ info.setText(CommonConstants.EMPTY);
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+
+ }
+ };
+
+ private MouseListener tableMouseListener = new MouseListener() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ if (selected.isDirectory()) {
+ current = selected;
+ updateData();
+ }
+ }
+ };
+
+ private DACustomButtonClickEventListener goButtonClickListener = new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ String path = inputText.getText();
+ if (null == path || path.isEmpty()) {
+ System.out.println("path must not empty");
+ inputText.setBackground(ColorResources.RED);
+ info.setText("Empty path");
+ return;
+ }
+
+ if (!path.contains(root.getAbsolutePath())) {
+ System.out.println("Out of root range");
+ inputText.setBackground(ColorResources.RED);
+ info.setText("Out of root range");
+ return;
+ }
+
+ File file = new File(path);
+ if (!file.exists() || !file.isDirectory()) {
+ System.out.println("target path is invalid");
+ inputText.setBackground(ColorResources.RED);
+ info.setText("Invalid path");
+ return;
+ }
+ inputText.setBackground(ColorResources.WHITE);
+ current = file;
+ updateData();
+ }
+ };
+
+ public DAFileExplorerCasval(Composite parent) {
+ super(parent, SWT.NONE);
+ this.setLayout(new FormLayout());
+ this.setBackground(ColorResources.DIALOG_BG_UPPER);
+
+ inputText = new Text(this, SWT.SINGLE);
+ FormData data = new FormData();
+ data.top = new FormAttachment(0, 5);
+ data.left = new FormAttachment(0, 5);
+ data.right = new FormAttachment(100, -80);
+ data.height = 18;
+ inputText.setLayoutData(data);
+
+ goButton = new DAButton(this, SWT.NONE);
+ data = new FormData();
+ data.top = new FormAttachment(0, 5);
+ data.left = new FormAttachment(inputText, 5);
+ data.right = new FormAttachment(100, -5);
+ data.height = 22;
+ goButton.setLayoutData(data);
+ goButton.setText("Go");
+ goButton.addClickListener(goButtonClickListener);
+
+// Label label = new Label(this, SWT.TRANSPARENT);
+// data = new FormData();
+// data.top = new FormAttachment(inputText, 5);
+// data.left = new FormAttachment(0, 20);
+// data.height = 18;
+// data.width = 70;
+// label.setLayoutData(data);
+// label.setText(CommonConstants.EMPTY);
+// label.setBackground(ColorResources.DIALOG_BG_UPPER);
+// label.setFont(FontResources.TABLE_CELL_FONT);
+
+ info = new Label(this, SWT.TRANSPARENT);
+ data = new FormData();
+ data.top = new FormAttachment(inputText, 10);
+ data.left = new FormAttachment(75, 0);
+ data.right = new FormAttachment(100, -6);
+ data.height = 18;
+ info.setLayoutData(data);
+ info.setText(CommonConstants.EMPTY);
+ info.setBackground(ColorResources.DIALOG_BG_UPPER);
+ info.setFont(FontResources.TABLE_CELL_FONT);
+
+ table = new DAGrid(this, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
+ table.setBackground(ColorResources.TABLE_CONTENTS_NORMAL);
+ table.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR);
+ // table.setFont(FontResources.EXPLORER_CELL_FONT);
+ setColumns();
+ table.setEmptyCellRenderer(new DAFileExplorerEmptyCellRenderer());
+ table.setItemHeight(40);
+
+ data = new FormData();
+ data.top = new FormAttachment(info, 5);
+ data.left = new FormAttachment(0, 0);
+ data.right = new FormAttachment(100, 0);
+ data.bottom = new FormAttachment(100, 0);
+ table.setLayoutData(data);
+
+ table.addSelectionListener(tableSelectionListener);
+ table.addMouseListener(tableMouseListener);
+ }
+
+ public void setColumns() {
+ GridColumn preColumn = new GridColumn(table, SWT.NONE);
+ preColumn.setCellRenderer(new DAFileExplorerTableRenderer());
+ preColumn.setHeaderRenderer(new DATableHeaderRenderer());
+ preColumn.setText("File");
+ preColumn.setWidth(20);
+
+ GridColumn fileColumn = new GridColumn(table, SWT.NONE);
+ fileColumn.setCellRenderer(new DAFileExplorerTableRenderer());
+ fileColumn.setHeaderRenderer(new DATableHeaderRenderer());
+ fileColumn.setText("File");
+ fileColumn.setWidth(395);
+
+ GridColumn postColumn = new GridColumn(table, SWT.NONE);
+ postColumn.setCellRenderer(new DAFileExplorerTableRenderer());
+ postColumn.setHeaderRenderer(new DATableHeaderRenderer());
+ postColumn.setText("File");
+ postColumn.setWidth(20);
+ }
+
+ public void updateData() {
+ if (null == current) {
+ if (null == root) {
+ System.out.println("Root is empty");
+ return;
+ }
+ current = root;
+ }
+ table.removeAll();
+ inputText.setText(current.getAbsolutePath());
+
+ if (!current.getAbsolutePath().equals(root.getAbsolutePath())) {
+ GridItem parentItem = new GridItem(table, SWT.NONE);
+ parentItem.setText(1, ExplorerUtil.PARENT_STR);
+ parentItem.setData(ExplorerUtil.DATA_FIEL_KEY,
+ current.getParentFile());
+ }
+ File[] children = current.listFiles();
+ if (null != children) {
+ int size = children.length;
+ for (int i = 0; i < size; i++) {
+ File child = children[i];
+ GridItem item = new GridItem(table, SWT.NONE);
+ item.setText(1, child.getName());
+ item.setData(ExplorerUtil.DATA_FIEL_KEY, child);
+ }
+ }
+
+ table.update();
+ }
+
+ public void setRoot(String r) {
+ if (null != r && !r.isEmpty()) {
+ File rootDir = new File(r);
+ if (!rootDir.exists() || !rootDir.isDirectory()) {
+ System.out.println("root path is invalid");
+ return;
+ } else {
+ root = rootDir;
+ }
+ }
+ }
+
+ public Grid getTable() {
+ return table;
+ }
+
+ public File getSelection() {
+ GridItem[] selections = table.getSelection();
+ if (selections.length > 0) {
+ GridItem selection = selections[0];
+ if (selection.getText().equals(ExplorerUtil.PARENT_STR)) {
+ return null;
+ }
+ File entry = (File) selection.getData(ExplorerUtil.DATA_FIEL_KEY);
+ if (entry.isDirectory()) {
+ return entry;
+ } else {
+ return entry.getParentFile();
+ }
+ } else {
+ return null;
+ }
+ }
+
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer;
+
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableEmptyCellRenderer;
+
+public class DAFileExplorerEmptyCellRenderer extends DATableEmptyCellRenderer {
+ @Override
+ public void paint(GC gc, Object value) {
+
+ Grid table = null;
+ if (value instanceof Grid) {
+ table = (Grid) value;
+ } else {
+ return;
+ }
+
+ boolean drawBackground = true;
+
+ if (isSelected()) {
+ gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_START);
+ gc.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END);
+ } else {
+ if (table.isEnabled()) {
+ drawBackground = false;
+ } else {
+ gc.setBackground(getDisplay().getSystemColor(
+ SWT.COLOR_WIDGET_BACKGROUND));
+ }
+ gc.setForeground(table.getForeground());
+ }
+
+ if (drawBackground && isSelected()) {
+ gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
+ getBounds().width, getBounds().height, true);
+ } else if (drawBackground) {
+ gc.fillRectangle(getBounds().x, getBounds().y + 1,
+ getBounds().width, getBounds().height);
+ }
+
+// if (table.getLinesVisible()) {
+// if (isCellSelected()) {
+// gc.setForeground(ColorResources.TABLE_LINE);
+// } else {
+// gc.setForeground(ColorResources.TABLE_LINE);
+// }
+// gc.drawLine(getBounds().x, getBounds().y + getBounds().height,
+// getBounds().x + getBounds().width - 1, getBounds().y
+// + getBounds().height);
+// gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y,
+// getBounds().x + getBounds().width - 1, getBounds().y
+// + getBounds().height);
+// }
+
+ }
+
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer;
+
+import java.io.File;
+
+import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Rectangle;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.resources.FontResources;
+import org.tizen.dynamicanalyzer.resources.ImageResources;
+import org.tizen.dynamicanalyzer.swap.platform.ui.ExplorerUtil;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableCellRenderer;
+import org.tizen.sdblib.service.FileEntry;
+
+public class DAFileExplorerTableRenderer extends DATableCellRenderer {
+ @Override
+ public void paint(GC gc, Object value) {
+ if (getColumn() != 1) {
+ return;
+ }
+ GridItem item = (GridItem) value;
+
+ gc.setFont(item.getFont(getColumn()));
+
+ boolean drawAsSelected = isSelected();
+
+ boolean drawBackground = true;
+
+ if (isCellSelected()) {
+ drawAsSelected = true;// (!isCellFocus());
+ }
+
+ if (drawAsSelected) {
+ gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_START);
+ gc.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END);
+ } else {
+ if (item.getParent().isEnabled()) {
+ Color bg = item.getBackground();
+ if (bg != null) {
+ gc.setBackground(bg);
+ } else {
+ drawBackground = false;
+ }
+ } else {
+ gc.setBackground(getDisplay().getSystemColor(
+ SWT.COLOR_WIDGET_BACKGROUND));
+ }
+ }
+
+ if (drawBackground && drawAsSelected) {
+ gc.fillGradientRectangle(getBounds().x, getBounds().y,
+ getBounds().width, getBounds().height, true);
+ } else if (drawBackground) {
+ gc.fillRectangle(getBounds().x, getBounds().y + 1,
+ getBounds().width, getBounds().height);
+ }
+
+ int x = leftMargin;
+
+ if (isTree()) {
+ x += getToggleIndent(item);
+
+ if (drawAsSelected) {
+ toggleRenderer.setSelected(true);
+ } else {
+ toggleRenderer.setSelected(false);
+ }
+ toggleRenderer.setExpanded(item.isExpanded());
+
+ toggleRenderer.setHover(getHoverDetail().equals("toggle")); //$NON-NLS-1$
+
+ toggleRenderer.setLocation(getBounds().x + x,
+ (getBounds().height - toggleRenderer.getBounds().height)
+ / 2 + getBounds().y);
+ toggleRenderer.paint(gc, item);
+
+ x += toggleRenderer.getBounds().width + insideMargin;
+ }
+
+ if (isCheck()) {
+
+ checkRenderer.setChecked(item.getChecked(getColumn()));
+ checkRenderer.setGrayed(item.getGrayed(getColumn()));
+ if (!item.getParent().isEnabled()) {
+ checkRenderer.setGrayed(true);
+ }
+ checkRenderer.setHover(getHoverDetail().equals("check")); //$NON-NLS-1$
+
+ checkRenderer.setBounds(getBounds().x + x,
+ (getBounds().height - checkRenderer.getBounds().height) / 2
+ + getBounds().y, checkRenderer.getBounds().width,
+ checkRenderer.getBounds().height);
+ checkRenderer.paint(gc, null);
+
+ x += checkRenderer.getBounds().width + insideMargin;
+ }
+
+ // Image image = item.getImage(getColumn());
+ // if (image != null) {
+ // int y = getBounds().y;
+ // y += (getBounds().height - image.getBounds().height) / 2;
+ // gc.drawImage(image, getBounds().x + x, y);
+ // x += image.getBounds().width + insideMargin;
+ // }
+
+ int width = getBounds().width - x - rightMargin;
+
+ String text = item.getText(getColumn());
+
+ if (getAlignment() == SWT.RIGHT) {
+ int len = gc.stringExtent(text).x;
+ if (len < width) {
+ x += width - len;
+ }
+ } else if (getAlignment() == SWT.CENTER) {
+ int len = gc.stringExtent(text).x;
+ if (len < width) {
+ x += (width - len) / 2;
+ }
+ }
+
+ if (drawAsSelected) {
+ gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_FONT_COLOR);
+ } else {
+ Color fontColor = item.getForeground();
+ if (null != fontColor) {
+ gc.setForeground(item.getForeground());
+ } else {
+ gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR);
+ }
+ }
+
+ Image image = null;
+ Object object = item.getData(ExplorerUtil.DATA_FIEL_KEY);
+ if (object instanceof File) {
+ File file = (File) object;
+ if (file.isDirectory()) {
+ image = ImageResources.ICON_DIR;
+ } else if (file.isFile()) {
+ image = ImageResources.ICON_FILE;
+ } else {
+ image = ImageResources.ICON_OTHER;
+ }
+ } else if (object instanceof FileEntry) {
+ FileEntry entry = (FileEntry) object;
+ switch (entry.getType()) {
+ case File:
+ image = ImageResources.ICON_FILE;
+ break;
+ case Link:
+ image = ImageResources.ICON_FILE_LINK;
+ break;
+ case Directory:
+ image = ImageResources.ICON_DIR;
+ break;
+ case DirectoryLink:
+ image = ImageResources.ICON_DIR_LINK;
+ break;
+ case RootEmulator:
+ image = ImageResources.ICON_EMULATOR;
+ break;
+ case RootDevice:
+ image = ImageResources.ICON_DEVICE;
+ break;
+ default:
+ image = ImageResources.ICON_OTHER;
+ break;
+ }
+ }
+
+ gc.drawImage(image, getBounds().x + x, getBounds().y + textTopMargin
+ - 3);
+ gc.setFont(FontResources.EXPLORER_CELL_FONT);
+ gc.drawText(text, getBounds().x + x + 20,
+ getBounds().y + textTopMargin, true);
+
+ if (item.getParent().getLinesVisible()) {
+ if (isCellSelected()) {
+ gc.setForeground(ColorResources.TABLE_LINE);
+ } else {
+ gc.setForeground(ColorResources.TABLE_LINE);
+ }
+ gc.drawLine(getBounds().x, getBounds().y + getBounds().height,
+ getBounds().x + getBounds().width - 1, getBounds().y
+ + getBounds().height);
+ // gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y,
+ // getBounds().x + getBounds().width - 1, getBounds().y
+ // + getBounds().height);
+ }
+
+ if (isCellFocus()) {
+ Rectangle focusRect = new Rectangle(getBounds().x - 1,
+ getBounds().y - 1, getBounds().width,
+ getBounds().height + 1);
+
+ gc.setForeground(ColorResources.RED);
+ gc.drawRectangle(focusRect);
+
+ if (isFocus()) {
+ focusRect.x++;
+ focusRect.width -= 2;
+ focusRect.y++;
+ focusRect.height -= 2;
+
+ gc.drawRectangle(focusRect);
+ }
+ }
+ }
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.swap.platform.ui.FileExplorer;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.dynamicanalyzer.common.DesignConstants;
+import org.tizen.dynamicanalyzer.common.PathManager;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.ui.widgets.DAButton;
+import org.tizen.dynamicanalyzer.ui.widgets.DAMessageBox;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
+
+public class FileExplorerCasvalDialog extends DAMessageBox {
+ private DAFileExplorerCasval explorer = null;
+ private DACustomButton okButton = null;
+ private DACustomButton cancelButton = null;
+
+ public FileExplorerCasvalDialog(Shell parentShell) {
+ super(parentShell);
+ shell.setLayout(new FormLayout());
+ shell.setSize(446, 600);
+ shell.setBackground(ColorResources.DIALOG_BG_UPPER);
+ shell.setText("Select binary");
+
+ explorer = new DAFileExplorerCasval(shell);
+ FormData data = new FormData();
+ data.top = new FormAttachment(0, 17);
+ data.left = new FormAttachment(0, 6);
+ data.height = 476;
+ data.width = 434;
+ explorer.setLayoutData(data);
+ explorer.setRoot(PathManager.getRootStrapsPath());
+ explorer.updateData();
+
+ Composite buttonComp = new Composite(shell, SWT.NONE);
+ buttonComp.setLayout(new FormLayout());
+ buttonComp.setBackground(ColorResources.DIALOG_BG_LOWER);
+
+ buttonComp.addPaintListener(new PaintListener() {
+
+ @Override
+ public void paintControl(PaintEvent e) {
+ Composite comp = (Composite) e.widget;
+ Rectangle rect = comp.getClientArea();
+ 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);
+ }
+ });
+
+ FormData compData = new FormData();
+ compData.top = new FormAttachment(explorer, 20);
+ compData.left = new FormAttachment(0, 0);
+ compData.right = new FormAttachment(100, 0);
+ compData.bottom = new FormAttachment(100, 0);
+ buttonComp.setLayoutData(compData);
+
+ okButton = new DAButton(buttonComp, SWT.NONE);
+ data = new FormData();
+ data.top = new FormAttachment(0, 11);
+ data.left = new FormAttachment(50, -DesignConstants.DA_BUTTON_WIDTH - 4);
+ data.height = DesignConstants.DA_BUTTON_HEIGHT;
+ data.width = DesignConstants.DA_BUTTON_WIDTH;
+ okButton.setLayoutData(data);
+ okButton.setText(AnalyzerLabels.OK);
+ okButton.addClickListener(new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ result = explorer.getSelection();
+ if (null != result) {
+ shell.dispose();
+ }
+ }
+ });
+
+ cancelButton = new DAButton(buttonComp, SWT.NONE);
+ data = new FormData();
+ data.top = new FormAttachment(0, 11);
+ data.left = new FormAttachment(50, 4);
+ data.height = DesignConstants.DA_BUTTON_HEIGHT;
+ data.width = DesignConstants.DA_BUTTON_WIDTH;
+ cancelButton.setLayoutData(data);
+ cancelButton.setText(AnalyzerLabels.CANCEL);
+ cancelButton.addClickListener(new DACustomButtonClickEventListener() {
+
+ @Override
+ public void handleClickEvent(DACustomButton button) {
+ shell.dispose();
+ }
+ });
+
+ // explorer.getTable().addMouseListener(new MouseListener() {
+ //
+ // @Override
+ // public void mouseUp(MouseEvent e) {
+ // // TODO Auto-generated method stub
+ //
+ // }
+ //
+ // @Override
+ // public void mouseDown(MouseEvent e) {
+ // // TODO Auto-generated method stub
+ //
+ // }
+ //
+ // @Override
+ // public void mouseDoubleClick(MouseEvent e) {
+ // Grid table = (Grid) e.widget;
+ // GridItem[] items = (GridItem[]) table.getSelection();
+ // if (null == items || items.length == 0) {
+ // return;
+ // }
+ // GridItem item = items[0];
+ // File entry = (File) item.getData(ExplorerUtil.DATA_FIEL_KEY);
+ //
+ // if (!entry.isDirectory()) {
+ // result = entry;
+ // shell.dispose();
+ // }
+ // }
+ // });
+ }
+}
// List<BinarySettingData> binaryData =
// BinarySettingManager.getInstance()
// .getTempBinarySettings();
+
boolean success = false;
try {
fileWriter = new FileWriter(saveFile);
// String inputParam = input[LogCenterConstants.INPUTPARM_INDEX];
String inputParam = ((ProbeCommonData) log).getArgs();
String[] splitInputParam = inputParam.split("\\,"); //$NON-NLS-1$
- int rmKey = Integer.parseInt(splitInputParam[0]);
+ String param = new String(splitInputParam[0]);
+ int rmKey = -1;
+ if (param.contains("0x")) {
+ rmKey = Integer.decode(param);
+ } else {
+ rmKey = Integer.parseInt(splitInputParam[0]);
+ }
leaks.remove(rmKey);
// internal check
-// if (chk.isCheckUserCall()) {
-// checkUserFuncLeakData(log, chk);
-// } else {
- // String key = input[chk.getKeyIndex()];
- // leaks.put(key, new LeakData(key, input, this));
- int key = log.getKey();
- leaks.put(key, new LeakData(log, this));
-// }
+ // if (chk.isCheckUserCall()) {
+ // checkUserFuncLeakData(log, chk);
+ // } else {
+ // String key = input[chk.getKeyIndex()];
+ // leaks.put(key, new LeakData(key, input, this));
+ int key = log.getKey();
+ leaks.put(key, new LeakData(log, this));
+ // }
}
}
}
});
-// binarySettingsButton
-// .addClickListener(new DACustomButtonClickEventListener() {
-//
-// @Override
-// public void handleClickEvent(DACustomButton button) {
-// BinaryAnalyzingConfigDialog dialog = new BinaryAnalyzingConfigDialog(
-// shell);
-// dialog.open();
-// }
-// });
-
aboutButton.addClickListener(new DACustomButtonClickEventListener() {
@Override
for (int i = 0; i < binData.size(); i++) {
InputRow inputRow = new InputRow(inputComposite);
inputRow.setBinaryText(binData.get(i).getBinaryPath());
- String source = binData.get(i).getSourcePath();
+ String source = binData.get(i).getDebugPath();
if (null != source && !source.isEmpty()) {
inputRow.setSourceText(source);
// String[] splitSource =
}
}
- private List<Composite> getTabChildren() {
+ private synchronized List<Composite> getTabChildren() {
if (null == children) {
children = new ArrayList<Composite>();
}
import org.tizen.dynamicanalyzer.resources.FontResources;
public class DATableCellRenderer extends DefaultCellRenderer {
- int leftMargin = 4;
- int rightMargin = 4;
- int topMargin = 0;
- int bottomMargin = 0;
- int textTopMargin = 1;
- int insideMargin = 3;
+ protected int leftMargin = 4;
+ protected int rightMargin = 4;
+ protected int topMargin = 0;
+ protected int bottomMargin = 0;
+ protected int textTopMargin = 15;
+ protected int insideMargin = 3;
protected DATableToggleRenderer toggleRenderer;
protected CheckBoxRenderer checkRenderer;
gc.setForeground(table.getForeground());
}
- if (drawBackground && isSelected()) {
- gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
- getBounds().width, getBounds().height, true);
- } else if (drawBackground) {
- gc.fillRectangle(getBounds().x, getBounds().y + 1,
- getBounds().width, getBounds().height);
- }
+// if (drawBackground && isSelected()) {
+// gc.fillGradientRectangle(getBounds().x, getBounds().y + 1,
+// getBounds().width, getBounds().height, true);
+// } else if (drawBackground) {
+// gc.fillRectangle(getBounds().x, getBounds().y + 1,
+// getBounds().width, getBounds().height);
+// }
if (table.getLinesVisible()) {
if (isCellSelected()) {