<classpathentry exported="true" kind="lib" path="lib/org.eclipse.cdt.core_5.3.1.201109151620.jar"/>
<classpathentry exported="true" kind="lib" path="lib/org.eclipse.cdt.debug.edc_2.0.0.201109151658.jar"/>
<classpathentry exported="true" kind="lib" path="lib/org.eclipse.cdt.dsf_2.2.0.201109151620.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/org.eclipse.nebula.widgets.grid_1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/org.eclipse.nebula.effects.stw.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jcommon-1.0.17.jar"/>
<classpathentry kind="lib" path="lib/sdblib.jar"/>
+ <classpathentry kind="lib" path="lib/org.eclipse.nebula.widgets.grid_1.0.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Link/,\\r
.settings/,\\r
.project,\\r
- .classpath,\\r
-\r
+ .classpath,\
\ No newline at end of file
--- /dev/null
+package org.tizen.dynamicanalyzer.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ColumnData {
+ private String text = null;
+ private int width = 0;
+ private List<ColumnData> children = null;
+
+ public ColumnData(String columnName) {
+ text = columnName;
+ children = new ArrayList<ColumnData>();
+ }
+
+ public ColumnData(String columnName, int width) {
+ text = columnName;
+ this.width = width;
+ children = new ArrayList<ColumnData>();
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public List<ColumnData> getChildren() {
+ return children;
+ }
+
+ public boolean isParent() {
+ if (children.isEmpty()) {
+ return false;
+ }
+ return true;
+ }
+
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+}
public static String FUNCTION_USAGE_PROFILER_DEPENDENT_LIB;
public static String FUNCTION_USER_PROFILING_VIEW_TITLE;
- public static String FUNCTION_USER_PROFILING_VIEW_CALL_COUNT;
- public static String FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_RATE;
- public static String FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_TIME;
- public static String FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_RATE;
- public static String FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_TIME;
public static String FUNCTION_USER_PROFILING_VIEW_NAME;
- public static String FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_ELASPED_TIME;
- public static String FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME;
+ public static String FUNCTION_USER_PROFILING_VIEW_CPU_TIME;
+ public static String FUNCTION_USER_PROFILING_VIEW_CPU_RATE;
+ public static String FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME;
+ public static String FUNCTION_USER_PROFILING_VIEW_CALL_COUNT;
public static String WARNING_CASE_BRIEF_DUPLICATE;
public static String WARNING_CASE_BRIEF_NO_OPERATION;
FUNCTION_USAGE_PROFILER_DEPENDENT_LIB=Dependent library
FUNCTION_USER_PROFILING_VIEW_TITLE=Function Usage Profiling
-FUNCTION_USER_PROFILING_VIEW_CALL_COUNT=Call count
-FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_RATE=Excl. CPU rate
-FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_TIME=Excl. CPU time
-FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_RATE=Incl. CPU rate
-FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_TIME=Incl. CPU time
FUNCTION_USER_PROFILING_VIEW_NAME=Library or function name
-FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_ELASPED_TIME=Excl. elapsed time
-FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME=Incl. elapsed time
-
+FUNCTION_USER_PROFILING_VIEW_CPU_RATE=CPU rate
+FUNCTION_USER_PROFILING_VIEW_CPU_TIME=CPU time
+FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME=Elapsed time
+FUNCTION_USER_PROFILING_VIEW_CALL_COUNT=Call count
WARNING_CASE_BRIEF_DUPLICATE=Duplicate file open.
WARNING_CASE_BRIEF_NO_OPERATION=File closed without changes.
err.printStackTrace();
img = ImageResources.NO_IMAGE;
} catch (Exception e) {
- e.printStackTrace();
+ System.out.println("Wait for receiving image : " + path);
img = ImageResources.NO_IMAGE;
}
if (img.isDisposed()) {
CircularGraph processGraph;
FourBarGraph cpuGrp;
private static String rss = "0"; //$NON-NLS-1$
- private static String time = "0"; //$NON-NLS-1$
+// private static String time = "0"; //$NON-NLS-1$
private static List<Long> cpuUsage;
private static long maxCpuUsage = 100;
private static long maxMem = 100;
data.width = 218;
data.height = 218;
snapshot.setLayoutData(data);
- // FIXME : not supported
snapshot.setEnable(true);
// process graph
rss = input.get(LogCenterConstants.DEVICE_RSS_MEMORY_INDEX + 1);
long totalMem = AnalyzerManager.getProject().getSystemMemorySize();
- time = input.get(LogCenterConstants.TIME_INDEX + 1);
+// time = input.get(LogCenterConstants.TIME_INDEX + 1);
// cpuUsage = cpus;
maxMem = totalMem;
processMem = Long.parseLong(rss);
processGraph.update(maxMem, processMem);
cpuGrp.setMaxSize(maxCpuUsage);
cpuGrp.setCurrentValue(cpuUsage);
- snapshot.drawSnapshot(time);
+ snapshot.drawSnapshot(Long.toString(startTime));
}
});
}
rss = input.get(LogCenterConstants.DEVICE_RSS_MEMORY_INDEX);
long totalMem = AnalyzerManager.getProject().getSystemMemorySize();
- time = input.get(LogCenterConstants.TIME_INDEX);
+// time = input.get(LogCenterConstants.TIME_INDEX);
maxMem = totalMem;
processMem = Long.parseLong(rss);
}
@Override
public void clear() {
- time = "0"; //$NON-NLS-1$
+// time = "0"; //$NON-NLS-1$
cpuUsage.clear();
maxMem = 100;
processMem = 0;
}
}
- public void updatePage(DASelectionData data) {
+ public void updatePage(final DASelectionData data) {
String viewId = data.getViewId();
int size = views.size();
for (int i = 0; i < size; i++) {
String key = views.get(i).getClass().getName();
if (key != null && !key.equals(viewId)) {
- ViewAction view = viewMap.get(key);
+ final ViewAction view = viewMap.get(key);
if (null != view) {
view.updateView(data);
}
private ProfilingTable treeComp = null;
int[] innerMaxWeight = { 100, 0 };
int[] outerMaxWeight = { 0, 100 };
-
+
private String[] columnNames = {
SummaryLabels.FUNCTION_USER_PROFILING_VIEW_NAME,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_TIME,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_RATE,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_TIME,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_RATE,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_TIME,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_RATE,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_TIME,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_RATE,
SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CALL_COUNT,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_ELASPED_TIME };
- private int[] columnSizes = { 200, 0, 0, 0, 0, 0, 0, 0 };
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME };
+// private int[] columnSizes = { 200, 0, 0, 0, 0, 0, 0, 0 };
private boolean[] columnVisibility = { true, true, true, true, true, true,
true, true };
int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE,
- AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
- AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM };
+ AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM };
int[] sourceColumns = { ProfilingData.NAME_INDEX,
ProfilingData.EXCOUNT_INDEX, ProfilingData.EXCOUNT_INDEX,
ProfilingData.INCOUNT_INDEX, ProfilingData.INCOUNT_INDEX,
treeComp.setSortTypes(sortTypes);
treeComp.setSourceColumns(sourceColumns);
treeComp.setColumns(columnNames);
- treeComp.setColumnSize(columnSizes);
+ // treeComp.setColumnSize(columnSizes);
treeComp.setColumnVisibility(columnVisibility);
treeComp.setTableToolTipEnable(false);
treeComp.setTableName("R_Function Usage");
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.summary.profiling;
+
+import org.eclipse.nebula.widgets.grid.GridColumnGroup;
+import org.eclipse.nebula.widgets.grid.internal.DefaultColumnGroupHeaderRenderer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.resources.FontResources;
+
+public class ColumnGroupRenderer extends DefaultColumnGroupHeaderRenderer {
+
+ int leftMargin = 6;
+
+ int rightMargin = 6;
+
+ int topMargin = 3;
+
+ int bottomMargin = 3;
+
+ int arrowMargin = 6;
+
+ int imageSpacing = 3;
+
+ @Override
+ public boolean notify(int arg0, Point arg1, Object arg2) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void paint(GC gc, Object arg1) {
+ GridColumnGroup column = (GridColumnGroup) arg1;
+ gc.setBackground(ColorResources.TABLE_HEADER_BG);
+ Rectangle rect = getBounds();
+ gc.fillRectangle(rect.x, rect.y, rect.width, rect.height);
+ gc.setForeground(ColorResources.TABLE_LINE);
+ gc.drawLine(rect.x - 1, rect.y, rect.x - 1, rect.y + rect.height);
+ gc.drawLine(rect.x - 1, rect.y - 1 + rect.height, rect.x + rect.width,
+ rect.y - 1 + rect.height);
+
+ gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR);
+ gc.setFont(FontResources.TABLE_HEADER);
+ String inputText = column.getText();
+ Point textSize = gc.textExtent(inputText, SWT.DRAW_MNEMONIC);
+ int textWidth = textSize.x;
+
+ int y = getBounds().y + getBounds().height - bottomMargin
+ - gc.getFontMetrics().getHeight();
+
+ int x = rect.x + (rect.width - textWidth) / 2;
+ gc.drawString(inputText, x, y, true);
+ }
+
+}
}
}
- if (getColumn() == 2 || getColumn() == 4) {
+ if (getColumn() == 2 || getColumn() == 5) {
if (drawAsSelected) {
gc.setForeground(ColorResources.PROFILING_GRAPH_SELECTION_COLOR_START);
gc.setBackground(ColorResources.PROFILING_GRAPH_SELECTION_COLOR_END);
package org.tizen.dynamicanalyzer.ui.summary.profiling;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.model.ColumnData;
import org.tizen.dynamicanalyzer.model.DAView;
import org.tizen.dynamicanalyzer.nl.SummaryLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
private ProfilingTable treeComp = null;
int[] innerMaxWeight = { 100, 0 };
int[] outerMaxWeight = { 0, 100 };
-
+ List<ColumnData> columnData = null;
+
private String[] columnNames = {
SummaryLabels.FUNCTION_USER_PROFILING_VIEW_NAME,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_TIME,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_CPU_RATE,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_TIME,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_RATE,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CALL_COUNT,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME,
- SummaryLabels.FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE_ELASPED_TIME };
- private int[] columnSizes = { 200, 0, 0, 0, 0, 0, 0, 0 };
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_TIME,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_RATE,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_TIME,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_RATE,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME,
+ SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CALL_COUNT };
+ private int[] columnSizes = { 260, 0, 0, 0, 0, 0, 0, 0 };
private boolean[] columnVisibility = { true, true, true, true, true, true,
true, true };
int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE,
- AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
- AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM };
+ AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM };
int[] sourceColumns = { ProfilingData.NAME_INDEX,
ProfilingData.EXCOUNT_INDEX, ProfilingData.EXCOUNT_INDEX,
ProfilingData.INCOUNT_INDEX, ProfilingData.INCOUNT_INDEX,
treeComp.setTree(true);
treeComp.setSortTypes(sortTypes);
treeComp.setSourceColumns(sourceColumns);
- treeComp.setColumns(columnNames);
+ createColumnData();
+ treeComp.setColumns(columnData);
+ // treeComp.setColumns(columnNames);
treeComp.setColumnSize(columnSizes);
treeComp.setColumnVisibility(columnVisibility);
treeComp.setTableToolTipEnable(false);
treeComp.setTableName(SummaryLabels.FUNCTION_USER_PROFILING_VIEW_TITLE);
}
+ private void createColumnData() {
+ int columnIndex = 0;
+ columnData = new ArrayList<ColumnData>();
+ ColumnData data0 = new ColumnData(columnNames[columnIndex++]);
+ columnData.add(data0);
+
+ ColumnData data1 = new ColumnData("Exclusive");
+ ColumnData data1Child1 = new ColumnData(columnNames[columnIndex++]);
+ ColumnData data1Child2 = new ColumnData(columnNames[columnIndex++]);
+ ColumnData data1Child3 = new ColumnData(columnNames[columnIndex++]);
+ data1.getChildren().add(data1Child1);
+ data1.getChildren().add(data1Child2);
+ data1.getChildren().add(data1Child3);
+ columnData.add(data1);
+
+ ColumnData data2 = new ColumnData("Inclusive");
+ ColumnData data2Child1 = new ColumnData(columnNames[columnIndex++]);
+ ColumnData data2Child2 = new ColumnData(columnNames[columnIndex++]);
+ ColumnData data2Child3 = new ColumnData(columnNames[columnIndex++]);
+ data2.getChildren().add(data2Child1);
+ data2.getChildren().add(data2Child2);
+ data2.getChildren().add(data2Child3);
+ columnData.add(data2);
+
+ ColumnData data3 = new ColumnData(columnNames[columnIndex++]);
+ columnData.add(data3);
+ }
+
@Override
public void updateView() {
treeComp.updateTree();
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
+import org.eclipse.nebula.widgets.grid.GridColumnGroup;
import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.CommonConstants;
import org.tizen.dynamicanalyzer.common.DASelectionData;
+import org.tizen.dynamicanalyzer.model.ColumnData;
import org.tizen.dynamicanalyzer.model.TreeInput;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
public ProfilingTable(Composite parent, int compStyle, int tableStyle) {
super(parent, compStyle, tableStyle);
setComparator(new TreeDataComparator());
+// createColumnData();
comparator.setType(AnalyzerConstants.SORT_TYPE_NUM);
comparator.setColumn(2);
});
}
- @Override
- public void setColumns(String[] columnNames) {
- int size = columnNames.length;
+ public void setColumns(List<ColumnData> columnData) {
+ int size = columnData.size();
+ int index = 0;
for (int i = 0; i < size; i++) {
- GridColumn column = new GridColumn(tree, SWT.NONE);
- column.setText(columnNames[i]);
- if (treeTable && i == 0) {
- column.setTree(true);
+ if (columnData.get(i).isParent()) {
+ GridColumnGroup columnGroup = new GridColumnGroup(tree,
+ SWT.NONE);
+ columnGroup.setHeaderRenderer(new ColumnGroupRenderer());
+ columnGroup.setText(columnData.get(i).getText());
+ List<ColumnData> children = columnData.get(i).getChildren();
+ int childSize = children.size();
+ for (int ii = 0; ii < childSize; ii++) {
+ createColumn(columnGroup, children.get(ii), index++);
+ }
+ } else {
+ createColumn(tree, columnData.get(i), index++);
}
- column.setCellRenderer(new FunctionUsageProfilingTableCellRenderer());
- column.setHeaderRenderer(new DATableHeaderRenderer());
+ }
+ }
+
+ private void createColumn(Object parent, ColumnData data, int index) {
+ GridColumn column = null;
+ if (parent instanceof GridColumnGroup) {
+ GridColumnGroup group = (GridColumnGroup) parent;
+ column = new GridColumn(group, SWT.NONE);
+ } else {
+ Grid table = (Grid) parent;
+ column = new GridColumn(table, SWT.NONE);
+ }
+
+ column.setCellRenderer(new FunctionUsageProfilingTableCellRenderer());
+ column.setHeaderRenderer(new DATableHeaderRenderer());
+ column.setText(data.getText());
+ if (data.getWidth() == 0) {
column.pack();
+ } else {
+ column.setWidth(data.getWidth());
+ }
+ if (treeTable && index == 0) {
+ column.setTree(true);
+ }
- if (null != comparator && null != sourceColumns
- && null != sortTypes) {
- final int type = sortTypes[i];
- final int sourceColumn = sourceColumns[i];
- final int columnIndex = i;
- column.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- comparator.setType(type);
- comparator.setColumn(columnIndex);
- comparator.setSourceColumn(sourceColumn);
- comparator.reverseDirection();
- updateTree();
- }
- });
- }
+ if (null != comparator && null != sourceColumns && null != sortTypes) {
+ final int type = sortTypes[index];
+ final int sourceColumn = sourceColumns[index];
+ final int columnIndex = index;
+ column.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent event) {
+ comparator.setType(type);
+ comparator.setColumn(columnIndex);
+ comparator.setSourceColumn(sourceColumn);
+ comparator.reverseDirection();
+ updateTree();
+ }
+ });
}
}
text.add(input.getName()); // must add 0 column data empty
text.add(exTime);
text.add(exRate + " " + CommonConstants.PERCENT); //$NON-NLS-1$
+ text.add(exeTime);
if (inputType == AnalyzerConstants.FUPD_DEPENDENT_LIB) {
text.add("-");
text.add("-");
text.add(inTime);
text.add(inRate + " " + CommonConstants.PERCENT); //$NON-NLS-1$
}
- text.add(callCount);
- text.add(exeTime);
text.add(inExeTime);
+ text.add(callCount);
TreeInput output = new TreeInput();
output.setText(text);
@Override
public List<TreeInput> makeTreeInput() {
List<TreeInput> output = new ArrayList<TreeInput>();
- ProfileDataMaker profiler = FunctionUsageProfiler.getInstance().getProfileDataMaker();
+ ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
+ .getProfileDataMaker();
ProfilingData appBin = profiler.getAppBin();
if (null != appBin) {
TreeInput appBinInput = makeInput(appBin,
rightForm = new SashForm(leftForm, SWT.VERTICAL);
// index 1 : INFO_INDEX
-// DATimelineTabComposite tabView = new DATimelineTabComposite(rightForm,
-// SWT.NONE);
DATabComposite tabView = new DATabComposite(rightForm,SWT.NONE);
addView(tabView);
{
import org.tizen.dynamicanalyzer.nl.TimelinePageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.sql.SqlManager;
+import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView;
+import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
+import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineView;
+import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite;
import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
public class CallTraceView extends DAView {
public static final String ID = CallTraceView.class.getName();
AnalyzerConstants.SORT_TYPE_STRING };
int[] sourceColumns = { LogCenterConstants.TIME_INDEX,
LogCenterConstants.APINAME_INDEX };
- int[] innerMaxWeight = {0, 100};
- int[] outerMaxWeight = {0, 100};
+ int[] innerMaxWeight = { 0, 100 };
+ int[] outerMaxWeight = { 0, 100 };
public CallTraceView(Composite parent, int style) {
super(parent, style);
tableComp.setColumns(columnNames);
tableComp.setColumnSize(columnSizes);
tableComp.setColumnVisibility(columnVisibility);
-
+
setMaxWeight(innerMaxWeight, outerMaxWeight);
}
sel.put(seq, seq);
}
}
+
+ /* only callstack update */
+ // timeline view and tabcomp top view : callstack
+ if (selData.getViewId().equals(TimelineView.ID)) {
+ DATabComposite tabView = (DATabComposite) AnalyzerUtil.getView(
+ TimelinePage.ID, DATabComposite.ID);
+ Composite comp = tabView.getTopComposite();
+ if (comp instanceof CallstackView) {
+ ((CallstackView) comp).updateView();
+ }
+ }
}
@Override
}
}
-
}
import org.eclipse.nebula.widgets.grid.internal.TextUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
-
public class DATableHeaderRenderer extends DefaultColumnHeaderRenderer {
int leftMargin = 6;
Rectangle r = getBounds();
gc.fillRectangle(r.x, r.y, r.width, r.height);
gc.setForeground(ColorResources.TABLE_LINE);
- gc.drawLine(r.x -1, r.y, r.x -1, r.y + r.height);
- gc.drawLine(r.x -1, r.y + r.height, r.x + r.width, r.y + r.height);
+ gc.drawLine(r.x - 1, r.y, r.x - 1, r.y + r.height);
+ gc.drawLine(r.x - 1, r.y + r.height, r.x + r.width, r.y + r.height);
int pushedDrawingOffset = 0;
if (drawSelected) {
// font color
gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR);
gc.setFont(FontResources.TABLE_HEADER);
+ String inputText = TextUtils.getShortString(gc, column.getText(), width);
+ Point textSize = gc.textExtent(inputText, SWT.DRAW_MNEMONIC);
- int y = getBounds().y + getBounds().height - bottomMargin
- - gc.getFontMetrics().getHeight();
+ int textX = r.x + (r.width - textSize.x) / 2;
+ int y = getBounds().y + (getBounds().height - textSize.y) / 2;
gc.drawString(TextUtils.getShortString(gc, column.getText(), width),
- getBounds().x + x + pushedDrawingOffset, y
- + pushedDrawingOffset, true);
+ textX + pushedDrawingOffset, y + pushedDrawingOffset, true);
if (column.getSort() != SWT.NONE) {
arrowRenderer.setSelected(column.getSort() == SWT.UP);