public static final int LOG_RESOURCE = 5;
public static final int LOG_LIFECYCLE = 6;
public static final int LOG_SNAPSHOT = 7;
+ public static final int LOG_UI_SCENE = 8;
public static final int LOG_DEVICE = 9;
public static final int LOG_SAMPLE = 11;
public static final int LOG_SYSTEM = 12;
public static final int COMMON_COLUMN_SIZE_PCADDR = 0;
public static final int COMMON_COLUMN_SIZE_ERROR = 0;
+ /* Log UserInterface Control List view */
+ public static final int USER_INTERFACE_CONTROL_LIST_PARENT_NAME_INDEX = 12;
+ public static final int USER_INTERFACE_CONTROL_LIST_PARENT_POINT_INDEX = 13;
+ public static final int USER_INTERFACE_CONTROL_LIST_CHILD_NAME_INDEX = 14;
+ public static final int USER_INTERFACE_CONTROL_LIST_CHILD_POINT_INDEX = 15;
+
+ /* Log UserInterface Scene Transforms List view */
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_SCENE_NAME_INDEX = 12;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME_INDEX = 13;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_POINT_INDEX = 14;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME_INDEX = 15;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_POINT_INDEX = 16;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_DIRECTION_INDEX = 17;
+
+
public static String getLogCenterNameFromId(int id) {
if (id == LOG_MEMORY) {
return "memory"; //$NON-NLS-1$
public static String USERINTERFACE_SNAPSHOT_VIEW_NAME;
-
-
public static String USERINTERFACE_CONTROL_LIST_VIEW_NAME;
- public static String USERINTERFACE_CONTROL_LIST_VIEW_INDEX;
- public static String USERINTERFACE_CONTROL_LIST_VIEW_TIME;
+ public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_0;
+ public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_1;
public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_2;
public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_3;
- public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_4;
- public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_5;
- public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_6;
-
+
public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME;
- public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_INDEX;
- public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_TIME;
+ public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_0;
+ public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_1;
public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_2;
public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_3;
public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_4;
- public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_5;
- public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_6;
public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME;
public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0;
public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_3;
public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_4;
public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5;
-
- public static String USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_NAME;
- public static String USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_0;
- public static String USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_1;
- public static String USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_2;
- public static String USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_3;
- public static String USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_4;
- public static String USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_5;
- public static String USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_6;
+ public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_6;
+ public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_7;
+ public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_8;
+
+ public static String USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_NAME;
+ public static String USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_0;
+ public static String USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_1;
+ public static String USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_2;
+ public static String USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_3;
+ public static String USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_4;
+
static {
// initialize resource bundle
-USERINTERFACE_CONTROL_LIST_VIEW_NAME = Control List View
-USERINTERFACE_CONTROL_LIST_VIEW_INDEX = \#
-USERINTERFACE_CONTROL_LIST_VIEW_TIME = Time
-USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_2 = Control
-USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_3 = Class Name
-USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_4 = Init. Time
-USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_5 = Term. Time
-USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_6 = NULL
+USERINTERFACE_CONTROL_LIST_VIEW_NAME = Controls
+USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_0 = Control
+USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_1 = Class Name
+USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_2 = Init. Time
+USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_3 = Term. Time
-USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME = Scene Transform List View
-USERINTERFACE_SCENETRANSFORM_LIST_VIEW_INDEX = \#
-USERINTERFACE_SCENETRANSFORM_LIST_VIEW_TIME = Time
-USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_2 = Scene Name
-USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_3 = Tranform Time
-USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_4 = Form Name
-USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_5 = Panel Name
-USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_6 = Draw Time
+USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME = Scene Transforms
+USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_0 = Scene Name
+USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_1 = Time
+USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_2 = Form Name
+USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_3 = Panel Name
+USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_4 = Transform Time
USERINTERFACE_SNAPSHOT_VIEW_NAME = Snapshot
-USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME = UI Function Profiling List View
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME = UI Function Profiling
USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0 = Library or Function Name
USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_1 = Excl. CPU Time
-USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_2 = Incl. CPU Time
-USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_3 = Excl. Elapsed Time
-USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_4 = Incl. Esapsed Time
-USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5 = Avg. Time
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_2 = Incl. CPU Time
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_3 = Incl. Esapsed Time
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_4 = Excl. Elapsed Time
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5 = Excl. CPU Avg. Time
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_6 = Incl. CPU Avg. Time
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_7 = Incl. Esapsed Avg. Time
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_8 = Excl. Elapsed Avg. Time
-USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_NAME = Form Based Leak List View
-USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_0 = API
-USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_1 = Leak Type
-USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_2 = Time
-USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_3 = Parameter
-USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_4 = Return Value
-USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_5 = NULL
-USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_6 = NULL
\ No newline at end of file
+USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_NAME = Form Based Leak
+USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_0 = API
+USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_1 = Leak Type
+USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_2 = Time
+USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_3 = Parameter
+USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_4 = Return Value
\ No newline at end of file
import org.tizen.dynamicanalyzer.nl.SummaryLabels;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePageDataManager;
import org.tizen.dynamicanalyzer.utils.Formatter;
public class FunctionUsageProfiler {
child.addExCount();
child.addElpasedTime(exeTime);
child.setParent(parent.getName());
+
if (type != LogCenterConstants.USER_FUNCTION_EVENT_TYPE_EXIT) {
child.addCallCount();
}
} else {
- ProfilingData child = getProfilingDataByKey(inputCallstackApiData
- .getSymbol());
+ ProfilingData child = getProfilingDataByKey(inputCallstackApiData.getSymbol());
if (null == child) {
child = makeNewProfilingData(inputCallstackApiData, false);
parent.addChild(child);
}
child.addExclusiveElapsedTime(current.getInclusiveExeTime());
current = current.getParent();
+ UserInterfacePageDataManager.getInstance().getfunctionProfilingDataChecker().addPfofilingData( child );
}
} else {
if (null == current) {
}
fupData = makeNewProfilingData(callstackCsa, false);
fupData.setParent(inParent.getName());
+
inParent.addChild(fupData);
inParent.addInCount(totalSampleCount);
-
if (null != inParent.getParent()) {
String pInParentName = inParent.getParent();
ProfilingData pp = getProfilingDataByKey(pInParentName);
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
import org.tizen.dynamicanalyzer.logparser.LogPackage;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView;
import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
-import org.tizen.dynamicanalyzer.ui.timeline.DATimelineTabComposite;
+import org.tizen.dynamicanalyzer.ui.userinterface.control.UserInterfaceControlListView;
+import org.tizen.dynamicanalyzer.ui.userinterface.leak.UserInterfaceFormBasedLeakListView;
+import org.tizen.dynamicanalyzer.ui.userinterface.profiling.UserInterfaceFunctionProfilingView;
+import org.tizen.dynamicanalyzer.ui.userinterface.scene.UserInterfaceSceneTransformListView;
+import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite;
public class UserInterfacePage extends DAPageComposite {
- public static final String ID = UserInterfacePage.class.getName();
+
SashForm baseForm;
SashForm upperForm;
SashForm bottomForm;
+ public static final String ID = UserInterfacePage.class.getName();
+ public static final String TAB_ID = ID + CommonConstants.UNDERBAR + "tab";
- UserInterfacePageDataManager tManager = UserInterfacePageDataManager
- .getInstance();
+ UserInterfacePageDataManager tManager = UserInterfacePageDataManager.getInstance();
- public UserInterfacePage(Composite parent, int style) {
+ public UserInterfacePage(Composite parent, int style) {
super(parent, style);
name = AnalyzerLabels.COOLBAR_AREA_UI;
this.setLayout(new FillLayout());
System.out.println(" UserInterfacePage");
-
baseForm = new SashForm(this, SWT.VERTICAL);
baseForm.setLayout(new FillLayout());
upperForm = new SashForm(baseForm, SWT.HORIZONTAL);
- UserInterfaceControlListView topLeftFirst = new UserInterfaceControlListView(
- upperForm, SWT.NONE);
+ UserInterfaceControlListView topLeftFirst = new UserInterfaceControlListView(upperForm,SWT.NONE);
addView(topLeftFirst);
-
- UserInterfaceSceneTransformListView topLeftSecond = new UserInterfaceSceneTransformListView(
- upperForm, SWT.NONE);
- addView(topLeftSecond);
-
- DATimelineTabComposite topLeftThird = new DATimelineTabComposite(
- upperForm, SWT.NONE);
- addView(topLeftThird);
+
+ UserInterfaceSceneTransformListView topLeftSecond = new UserInterfaceSceneTransformListView(upperForm, SWT.NONE);
+ addView(topLeftSecond);
+
+ DATabComposite tabView = new DATabComposite(upperForm, SWT.NONE, TAB_ID);
+ addView(tabView);
{
- SnapshotView currentView = new SnapshotView(
- topLeftThird.getContentComposite(), SWT.NONE, false);
- topLeftThird.addView(currentView);
+ SnapshotView currentView = new SnapshotView(tabView.getContentComposite(), SWT.NONE, false);
+ tabView.addView(currentView);
}
- upperForm.setWeights(new int[] { 35, 35, 30 });
-
+ upperForm.setWeights(new int[] { 40, 35, 25 });
+
bottomForm = new SashForm(baseForm, SWT.HORIZONTAL);
- UserInterfaceFunctionProfilingView bottomLeftFirst = new UserInterfaceFunctionProfilingView(
- bottomForm, SWT.NONE);
+ UserInterfaceFunctionProfilingView bottomLeftFirst = new UserInterfaceFunctionProfilingView(bottomForm, SWT.NONE);
addView(bottomLeftFirst);
-
- UserInterfaceFormBasedLeakListView bottomLeftSecond = new UserInterfaceFormBasedLeakListView(
- bottomForm, SWT.NONE);
+
+ UserInterfaceFormBasedLeakListView bottomLeftSecond = new UserInterfaceFormBasedLeakListView(bottomForm, SWT.NONE);
addView(bottomLeftSecond);
- bottomForm.setWeights(new int[] { 60, 40 });
+ bottomForm.setWeights(new int[] { 70, 30 });
}
public void updateLog(LogPackage logPack) {
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.swt.graphics.Color;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
import org.tizen.dynamicanalyzer.logparser.LogPackage;
import org.tizen.dynamicanalyzer.logparser.Logs;
-import org.tizen.dynamicanalyzer.nl.CommonPageLabels;
-import org.tizen.dynamicanalyzer.resources.ColorResources;
-import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphEventSeriesInfo;
-import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphSeries;
-import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphSeriesItem;
-import org.tizen.dynamicanalyzer.ui.basechart.PageChartItem;
-import org.tizen.dynamicanalyzer.ui.basechart.PageDataColumn;
-import org.tizen.dynamicanalyzer.ui.basechart.PageDataItem;
-import org.tizen.dynamicanalyzer.ui.basechart.PageDataManager;
+import org.tizen.dynamicanalyzer.ui.userinterface.control.UserInterfaceControlListDataChecker;
+import org.tizen.dynamicanalyzer.ui.userinterface.leak.UserInterfaceFormBasedLeakDataChecker;
+import org.tizen.dynamicanalyzer.ui.userinterface.profiling.UserInterfaceFunctionProfilingDataChecker;
+import org.tizen.dynamicanalyzer.ui.userinterface.scene.SceneTransformDataChecker;
-public class UserInterfacePageDataManager extends PageDataManager {
- private static UserInterfacePageDataManager instance = null;
- private static int THREAD_PAGE_COLUMN_COUNT = 9;
-// private PageChartItem mainThreadItem = null;
- private static String[] columnNames = {
- CommonPageLabels.COMMON_DATA_COLUMN_KEY,
- CommonPageLabels.COMMON_DATA_COLUMN_NUMBER,
- CommonPageLabels.COMMON_DATA_COLUMN_TIME,
- CommonPageLabels.COMMON_DATA_COLUMN_NAME,
- CommonPageLabels.COMMON_DATA_COLUMN_PARAMETER,
- CommonPageLabels.COMMON_DATA_COLUMN_THREADID,
- CommonPageLabels.COMMON_DATA_COLUMN_RETURN,
- CommonPageLabels.COMMON_DATA_COLUMN_ERRNO,
- CommonPageLabels.COMMON_DATA_COLUMN_APITYPE, };
+public class UserInterfacePageDataManager {
+
+ private static UserInterfacePageDataManager instance = null;
+
+ private static UserInterfaceControlListDataChecker controlListDataChecker = null;
+ private static SceneTransformDataChecker sceneTransformDataChecker = null;
+ private static UserInterfaceFormBasedLeakDataChecker formBasedLeakDataChecker = null;
+ private static UserInterfaceFunctionProfilingDataChecker functionProfilingDataChecker = null;
+
- private static Integer[] columnAttribute = {
- PageDataColumn.COLUMN_ATTRIBUTE_STRING,
- PageDataColumn.COLUMN_ATTRIBUTE_LONG,
- PageDataColumn.COLUMN_ATTRIBUTE_TIME,
- PageDataColumn.COLUMN_ATTRIBUTE_STRING,
- PageDataColumn.COLUMN_ATTRIBUTE_STRING,
- PageDataColumn.COLUMN_ATTRIBUTE_INT,
- PageDataColumn.COLUMN_ATTRIBUTE_STRING,
- PageDataColumn.COLUMN_ATTRIBUTE_INT,
- PageDataColumn.COLUMN_ATTRIBUTE_INT };
+ private LogPackage logPack = null;
+
+ int testcode = 0;
+
+ public class UserInterfaceLogPaserThread implements Runnable {
+ public void run() {
+ setControlDataTFromLogPackage(logPack);
+ setSceneTransformDataTFromLogPackage(logPack);
+ logPack = null;
+ }
+ }
+
public static UserInterfacePageDataManager getInstance() {
if (null == instance) {
instance = new UserInterfacePageDataManager();
private UserInterfacePageDataManager() {
}
-
- @Override
- public PageDataColumn registePageDataColumn() {
- // TODO Auto-generated method stub
- PageDataColumn pageColumn = new PageDataColumn(THREAD_PAGE_COLUMN_COUNT, columnNames, columnAttribute);
- return pageColumn;
+
+
+ public void parsePageData(LogPackage logPack) {
+// UserInterfaceLogPaserThread parserThread = new UserInterfaceLogPaserThread();
+// new Thread( parserThread ).start();
+// this.logPack = logPack;
+
+ setControlDataTFromLogPackage(logPack);
+ // setSceneTransformDataTFromLogPackage(logPack);
+
+
+ if (testcode == 0) {
+ testcode++;
+ String[] testLogs = {
+ "8,3601,snapshot1,1076601,5478,5478,testLog1, 1, 0,17,0,0,Scene Name1, Form Name1, 4545, Panel Name1, 454, 12",
+ "8,3602,snapshot2,1076602,5479,5479,testLog2, 1, 0,17,0,0,Scene Name2, Form Name2, 4546, Panel Name2, 455, 13"
+
+ };
+
+ int size = testLogs.length;
+ for (int i = 0; i < size; i++) {
+ String[] input = testLogs[i].split(",");
+ List<String> dddd = new ArrayList<String>();
+ for (int j = 0; j < input.length; j++) {
+ dddd.add(input[j]);
+ }
+ getSceneTransformDataChecker().parserLog(dddd);
+ }
+ }
}
+
+ public void setSceneTransformDataTFromLogPackage(LogPackage logPack) {
- @Override
- public List<List<String>> getLogsFromLogPackage(LogPackage logPack) {
-
- Logs logs = logPack.getLogs(LogCenterConstants.LOG_RESOURCE);
+ Logs logs = logPack.getLogs(LogCenterConstants.LOG_UI_SCENE);
if (null == logs || logs.getLogs().size() == 0) {
- return null;
+ return ;
}
-
-
List<List<String>> inputs = logs.getLogs();
List<List<String>> ret = new ArrayList<List<String>>();
int size = inputs.size();
-
- //System.out.println(" logs.getLogs() : " + logs.getLogs());
-
-
+
for (int i = 0; i < size; i++) {
List<String> input = inputs.get(i);
-
- // System.out.println("UserInterfacePageDataManager input : " + input);
-
- String fdType = input.get(LogCenterConstants.RESOURCE_FDTYPE_INDEX);
-
- int type = Integer.parseInt(fdType);
- if (type != LogCenterConstants.FD_TYPE_THREAD) {
- continue;
- }
+ getSceneTransformDataChecker().parserLog(input);
ret.add(input);
}
- return ret;
- }
-
- @Override
- public PageDataItem makePageData(List<String> input) {
-
- System.out.println(" makePageData " );
-
- // TODO Auto-generated method stub
- PageDataItem data = new PageDataItem(column, input);
- // key(object address)
- data.setText(PAGE_COLUMN_KEY,
- input.get(LogCenterConstants.RESOURCE_FDVALUE_INDEX));
- // number
- data.setText(PAGE_COLUMN_NUMBER,
- input.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX));
- // time
- data.setText(PAGE_COLUMN_TIME, input.get(LogCenterConstants.TIME_INDEX));
- // name
- data.setText(PAGE_COLUMN_NAME,
- input.get(LogCenterConstants.APINAME_INDEX));
- // parameter
- data.setText(PAGE_COLUMN_PARAMETER,
- input.get(LogCenterConstants.INPUTPARM_INDEX));
- // thread id
- data.setText(PAGE_COLUMN_THREADID,
- input.get(LogCenterConstants.THREAD_ID_INDEX));
- // return
- data.setText(PAGE_COLUMN_RETURN,
- input.get(LogCenterConstants.RETURN_INDEX));
- // errno
- data.setText(PAGE_COLUMN_ERRNO,
- input.get(LogCenterConstants.ERROR_INDEX));
- // api type
- data.setText(PAGE_COLUMN_APITYPE,
- input.get(LogCenterConstants.RESOURCE_FDAPITYPE_INDEX));
- return data;
}
+
+ public void setControlDataTFromLogPackage(LogPackage logPack) {
- public void addPageChartItem(PageDataItem dataItem, int itemIndex) {
- List<PageChartItem> items = pageChart.getItems();
- System.out.println(" addPageChartItem " );
+ Logs logs = logPack.getLogs(LogCenterConstants.LOG_RESOURCE);
+ if (null == logs || logs.getLogs().size() == 0) {
+ return ;
+ }
+ List<List<String>> inputs = logs.getLogs();
+ List<List<String>> ret = new ArrayList<List<String>>();
+ int size = inputs.size();
- int graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE;
- Color eventColor;
- boolean bInternalStart = false;
+ for (int i = 0; i < size; i++) {
+ List<String> input = inputs.get(i);
- if (dataItem.getText(PAGE_COLUMN_APITYPE).matches(
- LogCenterConstants.FD_API_TYPE_OPEN)) {
- graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_START;
- eventColor = openEventColor;
- } else if (dataItem.getText(PAGE_COLUMN_APITYPE).matches(
- LogCenterConstants.FD_API_TYPE_CLOSE)) {
- graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_END;
- eventColor = closeEventColor;
- } else if (dataItem.getText(PAGE_COLUMN_APITYPE).matches(
- LogCenterConstants.FD_API_INTERNAL_CLOSE)) {
- graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END;
- eventColor = closeEventColor;
- } else if (dataItem.getText(PAGE_COLUMN_APITYPE).matches(
- LogCenterConstants.FD_API_INTERNAL_START)) {
- graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_START;
- eventColor = openEventColor;
- bInternalStart = true;
- } else if (dataItem.getText(PAGE_COLUMN_APITYPE).matches(
- LogCenterConstants.FD_API_WAIT)) {
- graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_USE;
- eventColor = otherEventColor;
- } else if (dataItem.getText(PAGE_COLUMN_APITYPE).matches(
- LogCenterConstants.FD_API_INTERNAL_USE)) {
- graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_USE;
- eventColor = otherEventColor;
- } else {
- graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_START;
- eventColor = otherEventColor;
+ getControlDataChecker().parserLog(input);
+ ret.add(input);
}
+ }
+
- PageChartGraphSeriesItem seriesItem = new PageChartGraphSeriesItem(
- Long.parseLong(dataItem.getText(PAGE_COLUMN_TIME)), itemIndex,
- eventColor, graphSeriesItemStyle);
- String itemName = dataItem.getText(PAGE_COLUMN_KEY);
- int chartItemIndex = findChartItem(items, itemName);
- PageChartItem findItem = null;
- if (0 <= chartItemIndex) {
- findItem = items.get(chartItemIndex);
- }
- if (null != findItem && true == bInternalStart) {
- findItem.setTitle(dataItem.getText(PAGE_COLUMN_THREADID) + "("
- + findItem.getTitle() + ")");
+ public void clear() {
+ controlListDataChecker = null;
+ sceneTransformDataChecker = null;
+ formBasedLeakDataChecker = null;
+ }
+
+ public UserInterfaceControlListDataChecker getControlDataChecker() {
+ if (null == controlListDataChecker) {
+ controlListDataChecker = new UserInterfaceControlListDataChecker();
}
- PageChartGraphSeries firstItemSeries;
- if (null != findItem) {
- if (true == useSecondKey) {
- String childItemName = dataItem.getText(secondKeyIndex);
- List<PageChartItem> children = findItem.getChildren();
- int secondChartItemIndex = findChartItem(children,
- childItemName);
- PageChartItem secondFindItem = null;
- if (0 <= secondChartItemIndex) {
- secondFindItem = children.get(secondChartItemIndex);
- }
- PageChartGraphSeries secondItemseries = null;
- if (secondFindItem != null) {
- secondItemseries = secondFindItem.getSeriesList().get(0);
- secondItemseries.add(seriesItem);
- // return;
- } else {
- // FIXME :
- // create new child item
- secondItemseries = new PageChartGraphSeries(
- PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT);
- secondItemseries.add(seriesItem);
- // children.add(new PageChartItem(findItem, childItemName,
- // secondItemseries));
- new PageChartItem(findItem, childItemName, secondItemseries);
- // add series item to paret
- }
- }
- firstItemSeries = findItem.getSeriesList().get(0);
- firstItemSeries.add(seriesItem);
- } else {
- firstItemSeries = new PageChartGraphSeries(
- PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT);
- firstItemSeries
- .setEventSeriesInfo(new PageChartGraphEventSeriesInfo(
- ColorResources.THREAD_OPEN_START_RUN,
- ColorResources.THREAD_OPEN_END_RUN,
- ColorResources.THREAD_OPEN_START_STOP,
- ColorResources.THREAD_OPEN_END_STOP,
- ColorResources.THREAD_SLEEP_START,
- ColorResources.THREAD_SLEEP_END,
- ColorResources.THREAD_CLOSED_START,
- ColorResources.THREAD_CLOSED_END));
- firstItemSeries.add(seriesItem);
- PageChartItem firstItem = new PageChartItem(pageChart, itemName,
- firstItemSeries);
- // pageChart.addItem(firstItem);
- if (true == useSecondKey) {
- String childItemName = dataItem.getText(secondKeyIndex);
- PageChartGraphSeries secondItemseries = new PageChartGraphSeries(
- PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT);
- secondItemseries
- .setEventSeriesInfo(new PageChartGraphEventSeriesInfo(
- ColorResources.THREAD_OPEN_START_RUN,
- ColorResources.THREAD_OPEN_END_RUN,
- ColorResources.THREAD_OPEN_START_STOP,
- ColorResources.THREAD_OPEN_END_STOP,
- ColorResources.THREAD_SLEEP_START,
- ColorResources.THREAD_SLEEP_END,
- ColorResources.THREAD_CLOSED_START,
- ColorResources.THREAD_CLOSED_END));
- secondItemseries.add(seriesItem);
- new PageChartItem(firstItem, childItemName, secondItemseries);
- }
+ return controlListDataChecker;
+ }
+
+ public SceneTransformDataChecker getSceneTransformDataChecker() {
+ if (null == sceneTransformDataChecker) {
+ sceneTransformDataChecker = new SceneTransformDataChecker();
}
-
- return;
+ return sceneTransformDataChecker;
}
-
- @Override
- public boolean errorCheck(List<String> input) {
- // TODO Auto-generated method stub
- return false;
+
+ public UserInterfaceFunctionProfilingDataChecker getfunctionProfilingDataChecker() {
+ if (null == functionProfilingDataChecker) {
+ functionProfilingDataChecker = new UserInterfaceFunctionProfilingDataChecker();
+ }
+ return functionProfilingDataChecker;
}
-
- public void clear() {
- super.clear();
- // mainThreadItem = null;
- // instance = null;
+
+ public UserInterfaceFormBasedLeakDataChecker getFormBasedLeakDataChecker() {
+ if (null == formBasedLeakDataChecker) {
+ formBasedLeakDataChecker = new UserInterfaceFormBasedLeakDataChecker();
+ }
+ return formBasedLeakDataChecker;
}
+
+
+
}
\ No newline at end of file
+++ /dev/null
-package org.tizen.dynamicanalyzer.ui.userinterface;
-
-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.DASelectionData;
-import org.tizen.dynamicanalyzer.model.DAView;
-import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
-import org.tizen.dynamicanalyzer.resources.ColorResources;
-import org.tizen.dynamicanalyzer.ui.basechart.table.ThreadAPIListTable;
-import org.tizen.dynamicanalyzer.ui.file.FileApiListView;
-import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
-
-public class UserInterfaceSceneTransformListView extends DAView {
-
- public static final String ID = FileApiListView.class.getName();
-
- int[] innerMaxWeight = { 0, 100, 0 };
- int[] outerMaxWeight = { 100, 0 };
-
- private String[] columnNames = {
- UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_INDEX,
- UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_TIME,
- UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_2,
- UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_3,
- UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_4,
- UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_5,
- UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_6 };
- private int[] columnSizes = { 25, 80, 90, 90, 90, 90, 90 };
-
- DATableComposite tableComp = null;
-
- public UserInterfaceSceneTransformListView(Composite parent, int style) {
- super(parent, style);
- this.setLayout(new FillLayout());
-
- ViewContainer viewContainer = new ViewContainer(this, true);
- viewContainer
- .setTitleText(UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME);
- setMaxWeight(innerMaxWeight, outerMaxWeight);
-
- Composite contents = viewContainer.getContentArea();
- contents.setBackground(ColorResources.WINDOW_BG_COLOR);
- contents.setLayout(new FillLayout());
- tableComp = new ThreadAPIListTable(contents, SWT.NONE, SWT.SINGLE
- | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
- tableComp.setColumns(columnNames);
- tableComp.setColumnSize(columnSizes);
- }
-
- @Override
- public void updateView(DASelectionData data) {
- tableComp.updateTable();
- }
-
- @Override
- public void updateView() {
- tableComp.updateTable();
-
- }
-
- @Override
- public Control getControl() {
- return tableComp;
- }
-
- @Override
- public void clear() {
- tableComp.getTable().removeAll();
- }
-}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.control;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.utils.Formatter;
+
+public class UserInterfaceControlListData {
+ public static final int KEY_INDEX = LogCenterConstants.SEQUENCE_NUMBER_INDEX;
+
+ public static final int USER_INTERFACE_CONTROL_COLUMN_SIZE = 4;
+ public static final int USER_INTERFACE_CONTROL_LIST_CONTROL = 0;
+ public static final int USER_INTERFACE_CONTROL_LIST_CLASS_NAME = 1;
+ public static final int USER_INTERFACE_CONTROL_LIST_INITIALIZER_TIME = 2;
+ public static final int USER_INTERFACE_CONTROL_LIST_TERMININATE_TIME = 3;
+
+ private String strIndex = null;
+ private String strTime = null;
+ private String strControl = null;
+ private String strClassName = null;
+ private String strInitializeTime = null;
+ private String strTerminateTime = null;
+
+
+ private String strParent = null;
+ private String strChild = null;
+
+ private List<String> data;
+
+ public UserInterfaceControlListData(String[] input) {
+ List<String> data = getData();
+ for (int i = 0; i < input.length; i++) {
+ data.add(input[i]);
+ }
+ }
+
+ public UserInterfaceControlListData(List<String> input) {
+ if (null != input && !input.isEmpty()) {
+ getData().addAll(input);
+ }
+ }
+
+ public List<String> getData() {
+ if (null == data) {
+ data = new ArrayList<String>();
+ }
+ return data;
+ }
+
+ public String getLogData(int logIndex) {
+ if (!getData().isEmpty()) {
+ return data.get(logIndex);
+ }
+ return null;
+ }
+
+ public void setIndex(String data ){
+ strIndex = data;
+ }
+ public String getIndex(){
+ return strIndex;
+ }
+
+ public void setTime(String data ){
+ strTime = data;
+ }
+ public String getTime(){
+ return Formatter.toTimeFormat( strTime );
+ }
+
+ public void setControl(String data ){
+ strControl = data;
+ }
+ public String getControl(){
+ return strControl;
+ }
+
+ public void setClassName(String data ){
+ strClassName = data;
+ }
+ public String getClassName(){
+ return strClassName;
+ }
+
+ public void setInitializeTime(String data ){
+ strInitializeTime = data;
+ }
+ public String getInitializeTime(){
+ return Formatter.toTimeFormat( strInitializeTime );
+ }
+
+ public void setTerminateTime(String data ){
+ strTerminateTime = data;
+ }
+ public String getTerminateTime(){
+ return Formatter.toTimeFormat( strTerminateTime );
+ }
+
+ public void setParent(String data ){
+ strParent = data;
+ }
+ public String getParent(){
+ return strParent;
+ }
+
+ public void setChild(String data ){
+ strChild = data;
+ }
+ public String getChild(){
+ return strChild;
+ }
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.control;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+
+public class UserInterfaceControlListDataChecker {
+
+ List<UserInterfaceControlListData> formLeakList;
+
+ int testIndex = 0;
+ public void parserLog( List<String> input ){
+
+ String[] inputLog = new String[LogCenterConstants.USER_INTERFACE_CONTROL_LIST_CHILD_POINT_INDEX+1];
+
+ String[] slicedLog = null;
+ int size = input.size();
+
+ for (int i = 0, j = 0; i < size; i++) {
+ if (input.get(i).isEmpty()) {
+ continue;
+ }
+ String[] log = input.get(i).split(CommonConstants.NEW_LINE);
+ slicedLog = log[0].split(AnalyzerConstants.DATA_PARSING_TOKEN);
+
+ if ((i == LogCenterConstants.ID_INDEX)
+ || (i == LogCenterConstants.SEQUENCE_NUMBER_INDEX)
+ || (i == LogCenterConstants.APINAME_INDEX)
+ || (i == LogCenterConstants.TIME_INDEX)
+ || (i == LogCenterConstants.PROCESS_ID_INDEX)
+ || (i == LogCenterConstants.THREAD_ID_INDEX)
+ || (i == LogCenterConstants.INPUTPARM_INDEX)
+ || (i == LogCenterConstants.RETURN_INDEX)
+ || (i == LogCenterConstants.PCADDR_INDEX)
+ || (i == LogCenterConstants.ERROR_INDEX)
+ || (i == LogCenterConstants.INTERNAL_FLAG_INDEX)
+ || (i == LogCenterConstants.CALLER_PCADDR_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_CONTROL_LIST_PARENT_NAME_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_CONTROL_LIST_PARENT_POINT_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_CONTROL_LIST_CHILD_NAME_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_CONTROL_LIST_CHILD_POINT_INDEX)
+ ) {
+ inputLog[j++] = slicedLog[0].toString();
+ }
+ }
+ addData(inputLog);
+ }
+
+ private void addData(String[] input) {
+ UserInterfaceControlListData fd = new UserInterfaceControlListData(input);
+
+
+ fd.setIndex( input[ LogCenterConstants.SEQUENCE_NUMBER_INDEX ] );
+ fd.setTime( input[ LogCenterConstants.TIME_INDEX ] );
+ fd.setControl("test control");
+
+ // Test code
+ if ( testIndex == 0 ){
+ fd.setClassName("parent");
+ }else if ( testIndex == 1 ){
+ fd.setClassName("child");
+ }else{
+ fd.setClassName("test class name");
+ }
+
+
+ if ( testIndex == 10 ){
+ fd.setClassName("child2");
+ }
+
+ if ( testIndex == 11 ){
+ fd.setClassName("child2_child");
+ }
+
+ fd.setInitializeTime(input[ LogCenterConstants.TIME_INDEX ]);
+ fd.setTerminateTime(input[ LogCenterConstants.TIME_INDEX ]);
+
+ // Test code
+ if ( testIndex == 0 ){
+ fd.setParent("null");
+ }else if ( testIndex == 1 ){
+ fd.setParent("parent");
+ }else{
+ fd.setParent("null");
+ }
+
+
+ if ( testIndex == 10 ){
+ fd.setParent("parent");
+ }
+
+ if ( testIndex == 11 ){
+ fd.setParent("child2");
+ }
+
+ testIndex++;
+ getDataList().add(fd);
+ }
+
+ public List<UserInterfaceControlListData> getDataList() {
+ if (null == formLeakList) {
+ formLeakList = new ArrayList<UserInterfaceControlListData>();
+ }
+ return formLeakList;
+ }
+}
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Hyunjong Park <phjwithyou.park@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-package org.tizen.dynamicanalyzer.ui.userinterface;
+package org.tizen.dynamicanalyzer.ui.userinterface.control;
import java.io.BufferedReader;
import java.io.File;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.AnalyzerPaths;
import org.tizen.dynamicanalyzer.model.TreeInput;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
-import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler;
import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePageDataManager;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
import org.tizen.dynamicanalyzer.ui.widgets.table.TreeDataComparator;
-import org.tizen.dynamicanalyzer.utils.Formatter;
-public class UserInterfaceFunctionProfilingTable extends DATreeComposite {
+public class UserInterfaceControlListTable extends DATreeComposite {
private TreeSet<String> userInterfaceFunctionTree = new TreeSet<String>();
- public UserInterfaceFunctionProfilingTable(Composite parent, int compStyle,
+ public UserInterfaceControlListTable(Composite parent, int compStyle,
int tableStyle) {
super(parent, compStyle, tableStyle);
setComparator(new TreeDataComparator());
if (treeTable && i == 0) {
column.setTree(true);
}
- column.setCellRenderer(new UserInterfaceFunctionProfilingTableCellRenderer());
+ column.setCellRenderer(new UserInterfaceControlListTableCellRenderer());
column.setHeaderRenderer(new DATableHeaderRenderer());
column.pack();
return result;
}
- private TreeInput makeInput(ProfilingData input, int inputType) {
- // table data
- DATableDataFormat tableData = new DATableDataFormat(input.getSequence());
+ private TreeInput makeInput( UserInterfaceControlListData input ) {
+ DATableDataFormat tableData = new DATableDataFormat( input.getIndex());
+ List<String> inputData = new ArrayList<String>();
+
// make input data
- {
- // text
- List<String> inputData = new ArrayList<String>();
- for (int i = 0; i < ProfilingData.DATA_FIELD_SIZE; i++) {
- inputData.add(""); //$NON-NLS-1$
- }
- inputData.set(ProfilingData.SEQUENCE_INDEX, input.getSequence());
- inputData.set(ProfilingData.NAME_INDEX, input.getName());
- inputData.set(ProfilingData.EXCOUNT_INDEX,
- Integer.toString(input.getExCount()));
- inputData.set(ProfilingData.INCOUNT_INDEX,
- Integer.toString(input.getInCount()));
- inputData.set(ProfilingData.CALLCOUNT_INDEX,
- Integer.toString(input.getCallCount()));
- inputData.set(ProfilingData.PARENT_INDEX, input.getParent());
- inputData.set(ProfilingData.KEY_INDEX, input.getKey());
- inputData.set(ProfilingData.INCL_ELAPSED_TIME_INDEX,
- Integer.toString(input.getElapsedTime()));
- inputData.set(ProfilingData.EXCL_ELAPSED_TIME_INDEX,
- Integer.toString(input.getElapsedTime()));
- tableData.getData().addAll(inputData);
- }
-
- tableData.setObject(input.getName());
- FunctionUsageProfiler profiler = AnalyzerManager.getFunctionUserProfiler();
- String exTime = "-", avgExeTime = "-", inTime = "-", exeTime = "-", inExeTime = "-"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-
- try {
- if ( inputType >= AnalyzerConstants.FUPD_APPLICATION+2 ) {
- exTime = profiler.getCpuTime(input, true);
- exTime = Formatter.toTimeFormat2(exTime);
-
- inTime = profiler.getCpuTime(input, false);
- inTime = Formatter.toTimeFormat2(inTime);
- }
-
- if (0 == input.getElapsedTime()) {
- exeTime = "-"; //$NON-NLS-1$
- } else {
- exeTime = Integer.toString(input.getElapsedTime());
- exeTime = Formatter.toTimeFormat(exeTime);
- int nAvgExeTime = (input.getElapsedTime() / input.getCallCount());
- avgExeTime = Integer.toString(nAvgExeTime);
- avgExeTime = Formatter.toTimeFormat(avgExeTime);
- }
-
- if (0 == input.getExclusiveElapsedTime()) {
- inExeTime = "-"; //$NON-NLS-1$
- } else {
- inExeTime = Integer.toString(input.getExclusiveElapsedTime());
- inExeTime = Formatter.toTimeFormat(inExeTime);
- }
- } catch (NumberFormatException e) {
- // FIXME
- e.printStackTrace();
+ for (int i = 0; i < UserInterfaceControlListData.USER_INTERFACE_CONTROL_COLUMN_SIZE; i++) {
+ inputData.add(""); //$NON-NLS-1$
}
+ inputData.set(UserInterfaceControlListData.USER_INTERFACE_CONTROL_LIST_CONTROL, input.getControl() );
+ inputData.set(UserInterfaceControlListData.USER_INTERFACE_CONTROL_LIST_CLASS_NAME, input.getClassName() );
+ inputData.set(UserInterfaceControlListData.USER_INTERFACE_CONTROL_LIST_INITIALIZER_TIME, input.getInitializeTime() );
+ inputData.set(UserInterfaceControlListData.USER_INTERFACE_CONTROL_LIST_TERMININATE_TIME, input.getTerminateTime() );
+ tableData.getData().addAll(inputData);
+ tableData.setObject(input.getControl());
+
List<String> text = new ArrayList<String>();
- text.add(input.getName()); // must add 0 column data empty
- text.add(exTime);
- text.add(inTime);
- text.add(inExeTime);
- text.add(exeTime);
- text.add(avgExeTime);
+ text.add(input.getControl());
+ text.add(input.getClassName());
+ text.add(input.getInitializeTime());
+ text.add(input.getTerminateTime());
TreeInput output = new TreeInput();
output.setText(text);
output.setData(tableData);
- output.setParent(input.getParent());
return output;
}
+
// !! recursive!!
- public void makeChildTree(List<ProfilingData> children, TreeInput parent,String parentName, int type) {
- if (!children.isEmpty()) {
- int size = children.size();
- for (int i = 0; i < size; i++) {
- ProfilingData data = children.get(i);
+ public boolean makeChildTree(TreeInput nodeParent, TreeInput currentNode, String parentName, int nNodeDepth) {
- if (!data.getChildList().isEmpty()) {
- TreeInput input = makeInput(data, type);
- makeChildTree(data.getChildList(), input, data.getName(),type);
- parent.getChildren().add(input);
- input.setParent(parentName);
- } else {
- String[] splitApiNameList = data.getName().split("::"); //$NON-NLS-1$
- String strApiName = new String(
- splitApiNameList[splitApiNameList.length - 1].trim());
- String strSearch = userInterfaceFunctionTree.ceiling(strApiName);
- if (strSearch.equals(strApiName)) {
- // System.out.println("Find API List : " + strSearch + " "+ strApiName);
- TreeInput input = makeInput(data, type+1);
- parent.getChildren().add(input);
- input.setParent(parentName);
- } else {
- continue;
- }
+ String strParentName = nodeParent.getText().get(UserInterfaceControlListData.USER_INTERFACE_CONTROL_LIST_CLASS_NAME);
+ if (parentName.equals(strParentName)) {
+ nodeParent.getChildren().add(currentNode);
+ return true;
+ } else {
+ for (int i = 0; i < nodeParent.getChildren().size(); i++) {
+ if (makeChildTree(nodeParent.getChildren().get(i), currentNode, parentName, nNodeDepth++) == true ) {
+ break;
}
}
}
+ return false;
}
-
+
+
@Override
public List<TreeInput> makeTreeInput() {
+ UserInterfacePageDataManager tManager = UserInterfacePageDataManager.getInstance();
+ List<UserInterfaceControlListData> controlList = tManager.getControlDataChecker().getDataList();
List<TreeInput> output = new ArrayList<TreeInput>();
- FunctionUsageProfiler profiler = AnalyzerManager.getFunctionUserProfiler();
- ProfilingData appBin = profiler.getAppBin();
- if (null != appBin) {
- TreeInput appBinInput = makeInput(appBin, AnalyzerConstants.FUPD_APPLICATION);
- {
- List<ProfilingData> children = appBin.getChildList();
- makeChildTree(children, appBinInput, appBin.getName(),AnalyzerConstants.FUPD_APPLICATION+1);
+ int size = controlList.size();
+ int nNodeDepth = 0;
+ for (int i = 0; i < size; i++ ) {
+ TreeInput currentNode = makeInput( controlList.get(i) );
+ if ( controlList.get(i).getParent().equals("null")){
+ output.add( currentNode );
+ }else{
+ for (int j = 0; j < output.size(); j++) {
+ if ( makeChildTree( output.get(j), currentNode, controlList.get(i).getParent(), nNodeDepth++ ) == true ){
+ break;
+ }
+ }
}
- output.add(appBinInput);
}
return output;
+
}
private boolean getUIApiList() {
return true;
}
-}
\ No newline at end of file
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.control;
+
+import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.nebula.widgets.grid.IInternalWidget;
+import org.eclipse.nebula.widgets.grid.internal.CheckBoxRenderer;
+import org.eclipse.nebula.widgets.grid.internal.DefaultCellRenderer;
+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.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.resources.FontResources;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableToggleRenderer;
+
+public class UserInterfaceControlListTableCellRenderer extends
+DefaultCellRenderer {
+int leftMargin = 4;
+int rightMargin = 4;
+int topMargin = 0;
+int bottomMargin = 0;
+int textTopMargin = 1;
+int textBottomMargin = 2;
+int insideMargin = 3;
+int treeIndent = 20;
+
+private DATableToggleRenderer toggleRenderer;
+private CheckBoxRenderer checkRenderer;
+
+@Override
+public void paint(GC gc, Object value) {
+GridItem item = (GridItem) value;
+
+gc.setFont(item.getFont(getColumn()));
+
+boolean drawAsSelected = isSelected();
+
+boolean drawBackground = true;
+
+if (isCellSelected()) {
+ drawAsSelected = true;
+}
+
+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);
+ }
+}
+
+gc.setFont(FontResources.TABLE_CELL_FONT);
+
+if (getColumn() != 0) {
+ gc.drawText(text, getBounds().x + x, 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);
+ }
+}
+}
+
+private int getToggleIndent(GridItem item) {
+return item.getLevel() * 20;
+}
+
+public void setTree(boolean tree) {
+super.setTree(tree);
+
+if (tree) {
+ toggleRenderer = new DATableToggleRenderer();
+ toggleRenderer.setDisplay(getDisplay());
+}
+}
+
+public Point computeSize(GC gc, int wHint, int hHint, Object value) {
+GridItem item = (GridItem) value;
+gc.setFont(item.getFont(getColumn()));
+int x = 0;
+
+x += leftMargin;
+
+if (isTree()) {
+ x += getToggleIndent(item);
+ x += toggleRenderer.getBounds().width + insideMargin;
+}
+
+if (isCheck()) {
+ x += checkRenderer.getBounds().width + insideMargin;
+}
+
+int y = 0;
+Image image = item.getImage(getColumn());
+if (image != null) {
+ y = topMargin + image.getBounds().height + bottomMargin;
+
+ x += image.getBounds().width + insideMargin;
+}
+
+x += gc.stringExtent(item.getText(getColumn())).x + rightMargin;
+y = Math.max(y, topMargin + gc.getFontMetrics().getHeight()
+ + bottomMargin);
+
+return new Point(x, y);
+}
+
+public boolean notify(int event, Point point, Object value) {
+GridItem item = (GridItem) value;
+if (isCheck()) {
+ if (event == IInternalWidget.MouseMove) {
+ if (overCheck(item, point)) {
+ setHoverDetail("check"); //$NON-NLS-1$
+ return true;
+ }
+ }
+
+ if (event == IInternalWidget.LeftMouseButtonDown) {
+ if (overCheck(item, point)) {
+ item.setChecked(getColumn(), !item.getChecked(getColumn()));
+ item.getParent().redraw();
+ item.fireCheckEvent(getColumn());
+
+ return true;
+ }
+ }
+}
+
+if (isTree() && item.hasChildren()) {
+ if (event == IInternalWidget.MouseMove) {
+ if (overToggle(item, point)) {
+ setHoverDetail("toggle"); //$NON-NLS-1$
+ return true;
+ }
+ }
+
+ if (event == IInternalWidget.LeftMouseButtonDown) {
+ if (overToggle(item, point)) {
+ item.setExpanded(!item.isExpanded());
+ item.getParent().redraw();
+
+ if (item.isExpanded()) {
+ item.fireEvent(SWT.Expand);
+ } else {
+ item.fireEvent(SWT.Collapse);
+ }
+
+ return true;
+ }
+ }
+}
+
+return false;
+}
+
+private boolean overCheck(GridItem item, Point point) {
+point = new Point(point.x, point.y);
+point.x -= getBounds().x - 1;
+point.y -= getBounds().y - 1;
+
+int x = leftMargin;
+if (isTree()) {
+ x += getToggleIndent(item);
+ x += toggleRenderer.getSize().x + insideMargin;
+}
+
+if (point.x >= x && point.x < (x + checkRenderer.getSize().x)) {
+ int yStart = ((getBounds().height - checkRenderer.getBounds().height) / 2);
+ if (point.y >= yStart
+ && point.y < yStart + checkRenderer.getSize().y) {
+ return true;
+ }
+}
+
+return false;
+}
+
+private boolean overToggle(GridItem item, Point point) {
+point = new Point(point.x, point.y);
+point.x -= getBounds().x - 1;
+point.y -= getBounds().y - 1;
+
+int x = leftMargin;
+x += getToggleIndent(item);
+
+if (point.x >= x && point.x < (x + toggleRenderer.getSize().x)) {
+ // return true;
+ int yStart = ((getBounds().height - toggleRenderer.getBounds().height) / 2);
+ if (point.y >= yStart
+ && point.y < yStart + toggleRenderer.getSize().y) {
+ return true;
+ }
+}
+
+return false;
+}
+
+public void setCheck(boolean check) {
+super.setCheck(check);
+
+if (check) {
+ checkRenderer = new CheckBoxRenderer();
+ checkRenderer.setDisplay(getDisplay());
+} else {
+ checkRenderer = null;
+}
+}
+
+public Rectangle getTextBounds(GridItem item, boolean preferred) {
+int x = leftMargin;
+
+if (isTree()) {
+ x += getToggleIndent(item);
+
+ x += toggleRenderer.getBounds().width + insideMargin;
+
+}
+
+if (isCheck()) {
+ x += checkRenderer.getBounds().width + insideMargin;
+}
+
+Image image = item.getImage(getColumn());
+if (image != null) {
+ x += image.getBounds().width + insideMargin;
+}
+
+Rectangle bounds = new Rectangle(x, topMargin, 0, 0);
+
+GC gc = new GC(item.getParent());
+gc.setFont(item.getFont(getColumn()));
+Point size = gc.stringExtent(item.getText(getColumn()));
+
+bounds.height = size.y;
+
+if (preferred) {
+ bounds.width = size.x;
+} else {
+ bounds.width = getBounds().width - x - rightMargin;
+}
+
+gc.dispose();
+
+return bounds;
+}
+}
-package org.tizen.dynamicanalyzer.ui.userinterface;
+package org.tizen.dynamicanalyzer.ui.userinterface.control;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.ui.file.FileApiListView;
-import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData;
import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
public class UserInterfaceControlListView extends DAView {
int[] innerMaxWeight = { 100, 0, 0 };
int[] outerMaxWeight = { 100, 0 };
- private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_INDEX,
- UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_TIME,
- UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_2,
- UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_3,
- UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_4,
- UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_5 };
- private int[] columnSizes = { 25, 80, 80, 80, 80, 80, 80 };
+ private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_0
+ ,UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_1
+ ,UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_2
+ ,UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_3
+ };
+ private int[] columnSizes = { 200, 80, 80, 80 };
- UserInterfaceFunctionProfilingTable treeComp = null;
- private boolean[] columnVisibility = { 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 };
- int[] sourceColumns = { ProfilingData.NAME_INDEX,
- ProfilingData.EXCOUNT_INDEX, ProfilingData.EXCOUNT_INDEX,
- ProfilingData.INCOUNT_INDEX, ProfilingData.INCOUNT_INDEX,
- ProfilingData.CALLCOUNT_INDEX};
+ UserInterfaceControlListTable treeComp = null;
+ private boolean[] columnVisibility = { true, true, true, true, true };
+ int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE
+ ,AnalyzerConstants.SORT_TYPE_NUM
+ ,AnalyzerConstants.SORT_TYPE_NUM
+ ,AnalyzerConstants.SORT_TYPE_NUM };
+ int[] sourceColumns = { 0, 1, 2, 3, 4, 5};
public UserInterfaceControlListView(Composite parent, int style) {
super(parent, style);
ViewContainer viewContainer = new ViewContainer(this, true);
viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_NAME);
+
setMaxWeight(innerMaxWeight, outerMaxWeight);
Composite contents = viewContainer.getContentArea();
contents.setBackground(ColorResources.WINDOW_BG_COLOR);
contents.setLayout(new FillLayout());
- treeComp = new UserInterfaceFunctionProfilingTable(contents, SWT.NONE, SWT.SINGLE
+ treeComp = new UserInterfaceControlListTable(contents, SWT.NONE, SWT.SINGLE
| SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
/*** setTree set first!!! ***/
treeComp.setTree(true);
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.leak;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+
+public class UserInterfaceFormBasedLeakData {
+ public static final int KEY_INDEX = LogCenterConstants.SEQUENCE_NUMBER_INDEX;
+
+ private List<String> data;
+
+ public UserInterfaceFormBasedLeakData(String[] input) {
+ List<String> data = getData();
+ for (int i = 0; i < input.length; i++) {
+ data.add(input[i]);
+ }
+ }
+
+ public UserInterfaceFormBasedLeakData(List<String> input) {
+ if (null != input && !input.isEmpty()) {
+ getData().addAll(input);
+ }
+ }
+
+ public List<String> getData() {
+ if (null == data) {
+ data = new ArrayList<String>();
+ }
+ return data;
+ }
+
+ public String getLogData(int logIndex) {
+ if (!getData().isEmpty()) {
+ return data.get(logIndex);
+ }
+ return null;
+ }
+}
\ No newline at end of file
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.leak;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+
+public class UserInterfaceFormBasedLeakDataChecker {
+
+ List<UserInterfaceFormBasedLeakData> formLeakList;
+
+ public void parserLog( List<String> input ){
+
+ String[] inputLog = new String[LogCenterConstants.USER_INTERFACE_CONTROL_LIST_CHILD_POINT_INDEX+1];
+
+ String[] slicedLog = null;
+ int size = input.size();
+
+ for (int i = 0, j = 0; i < size; i++) {
+ if (input.get(i).isEmpty()) {
+ continue;
+ }
+ String[] log = input.get(i).split(CommonConstants.NEW_LINE);
+ slicedLog = log[0].split(AnalyzerConstants.DATA_PARSING_TOKEN);
+
+ if ((i == LogCenterConstants.ID_INDEX)
+ || (i == LogCenterConstants.SEQUENCE_NUMBER_INDEX)
+ || (i == LogCenterConstants.APINAME_INDEX)
+ || (i == LogCenterConstants.TIME_INDEX)
+ || (i == LogCenterConstants.PROCESS_ID_INDEX)
+ || (i == LogCenterConstants.THREAD_ID_INDEX)
+ || (i == LogCenterConstants.INPUTPARM_INDEX)
+ || (i == LogCenterConstants.RETURN_INDEX)
+ || (i == LogCenterConstants.PCADDR_INDEX)
+ || (i == LogCenterConstants.ERROR_INDEX)
+ || (i == LogCenterConstants.INTERNAL_FLAG_INDEX)
+ || (i == LogCenterConstants.CALLER_PCADDR_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_CONTROL_LIST_PARENT_NAME_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_CONTROL_LIST_PARENT_POINT_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_CONTROL_LIST_CHILD_NAME_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_CONTROL_LIST_CHILD_POINT_INDEX)
+ ) {
+ inputLog[j++] = slicedLog[0].toString();
+ }
+ }
+ addData(inputLog);
+ }
+
+ private void addData(String[] input) {
+ UserInterfaceFormBasedLeakData fd = new UserInterfaceFormBasedLeakData(input);
+ getDataList().add(fd);
+ }
+
+ public List<UserInterfaceFormBasedLeakData> getDataList() {
+ if (null == formLeakList) {
+ formLeakList = new ArrayList<UserInterfaceFormBasedLeakData>();
+ }
+ return formLeakList;
+ }
+}
\ No newline at end of file
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.leak;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePageDataManager;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
+import org.tizen.dynamicanalyzer.utils.Formatter;
+
+public class UserInterfaceFormBasedLeakListTable extends DATableComposite {
+
+ public UserInterfaceFormBasedLeakListTable(Composite parent, int style, int tableStyle) {
+ super(parent, style, tableStyle);
+ table.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ // GridItem[] items = table.getSelection();
+ // DASelectionData selData = new DASelectionData(UserInterfaceSceneTransformListView.ID, 0, 0, items, table);
+ // AnalyzerManager.getCurrentPage().updatePage(selData);
+ // AnalyzerManager.getCurrentPage().controlSelection(UserInterfaceSceneTransformListView.ID);
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+ protected List<TableInput> makeTableInput() {
+
+ UserInterfacePageDataManager tManager = UserInterfacePageDataManager.getInstance();
+
+ List<UserInterfaceFormBasedLeakData> transfomSceneList = tManager.getFormBasedLeakDataChecker().getDataList();
+
+ List<TableInput> input = new ArrayList<TableInput>();
+
+
+// int size = transfomSceneList.size();
+// for (int i = 0; i < size; i++) {
+//
+// // create text
+// List<String> text = new ArrayList<String>();
+// List<String> sceneTransformsData = transfomSceneList.get(i).getData();
+//
+//
+//
+// //??????? Transform Time, Draw Time
+// text.add(sceneTransformsData.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); // Index
+// String time = Formatter.toTimeFormat(sceneTransformsData.get(LogCenterConstants.TIME_INDEX)); // Time
+// text.add(time);
+// text.add(sceneTransformsData.get(LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_SCENE_NAME_INDEX)); // Scene Name
+//
+//
+// // Re-factoring
+// if( i % 2 == 0){
+// text.add("00:01.124"); // Transform Time
+// }else if( i % 3 == 0){
+// text.add("00:00.934"); // Transform Time
+// }else{
+// text.add("00:01.251"); // Transform Time
+// }
+//
+// text.add(sceneTransformsData.get(LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME_INDEX)); // Form Name
+// text.add(sceneTransformsData.get(LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME_INDEX)); // Panel Name
+//
+// // Re-factoring
+// if( i % 2 == 0){
+// text.add("00:00.343"); // Draw time
+// }else if( i % 3 == 0){
+// text.add("00:00.433"); // Draw time
+// }else{
+// text.add("00:00.659"); // Draw time
+// }
+//
+// // create DATableDataFormat
+// DATableDataFormat tableData = new DATableDataFormat(sceneTransformsData.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX));
+// tableData.getData().addAll(sceneTransformsData);
+//
+// TableInput tableInput = new TableInput();
+// tableInput.setText(text);
+// tableInput.setData(tableData);
+//
+// input.add(tableInput);
+// }
+ return input;
+ }
+
+}
-package org.tizen.dynamicanalyzer.ui.userinterface;
+package org.tizen.dynamicanalyzer.ui.userinterface.leak;
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.common.DASelectionData;
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
import org.tizen.dynamicanalyzer.model.DAView;
import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
-import org.tizen.dynamicanalyzer.ui.basechart.table.ThreadAPIListTable;
import org.tizen.dynamicanalyzer.ui.file.FileApiListView;
import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator;
public class UserInterfaceFormBasedLeakListView extends DAView {
public static final String ID = FileApiListView.class.getName();
+
int[] innerMaxWeight = { 0, 100 };
int[] outerMaxWeight = { 0, 100 };
- private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_0,
- UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_1,
- UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_2,
- UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_3,
- UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_4,
- UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_5,
- UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_COLUMN_6 };
- private int[] columnSizes = { 100, 90, 90, 90, 90, 90, 90 };
+ private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_0
+ ,UserInterfacePageLabels.USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_1
+ ,UserInterfacePageLabels.USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_2
+ ,UserInterfacePageLabels.USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_3
+ ,UserInterfacePageLabels.USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_COLUMN_4
+ };
+ private int[] columnSizes = { 100, 90, 90, 90, 90 };
+ private boolean[] columnVisibility = { true, true, true, true, true };
+
DATableComposite tableComp = null;
+ int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING};
+
+ int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX,
+ LogCenterConstants.TIME_INDEX, LogCenterConstants.APINAME_INDEX,
+ LogCenterConstants.INPUTPARM_INDEX,
+ LogCenterConstants.RETURN_INDEX,LogCenterConstants.RETURN_INDEX,LogCenterConstants.RETURN_INDEX};
+
public UserInterfaceFormBasedLeakListView(Composite parent, int style) {
super(parent, style);
this.setLayout(new FillLayout());
ViewContainer viewContainer = new ViewContainer(this, true);
- viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_FORMBASEDLEAK_LIST_VIEW_NAME);
+ viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_NAME);
+
setMaxWeight(innerMaxWeight, outerMaxWeight);
Composite contents = viewContainer.getContentArea();
contents.setBackground(ColorResources.WINDOW_BG_COLOR);
contents.setLayout(new FillLayout());
- tableComp = new ThreadAPIListTable(contents, SWT.NONE, SWT.SINGLE
+ tableComp = new UserInterfaceFormBasedLeakListTable(contents, SWT.NONE, SWT.SINGLE
| SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+ tableComp.setTableName(UserInterfacePageLabels.USERINTERFACE_FORMBASED_LEAK_LIST_VIEW_NAME);
+ tableComp.setComparator(new TableComparator());
+ tableComp.setSortTypes(sortTypes);
+ tableComp.setSourceColumns(sourceColumns);
tableComp.setColumns(columnNames);
tableComp.setColumnSize(columnSizes);
+ tableComp.setColumnVisibility(columnVisibility);
}
@Override
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.profiling;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData;
+import org.tizen.dynamicanalyzer.utils.Formatter;
+
+public class UserInterfaceFunctionProfilingData {
+ public static final int KEY_INDEX = LogCenterConstants.SEQUENCE_NUMBER_INDEX;
+
+ public static final int USER_INTERFACE_PROFILING_COLUMN_SIZE = 9;
+
+ public static final int USER_INTERFACE_PROFILING_LIST_API_NAME = 0;
+ public static final int USER_INTERFACE_PROFILING_LIST_EXCL_CPU_TIME = 1;
+ public static final int USER_INTERFACE_PROFILING_LIST_INCL_CPU_TIME = 2;
+ public static final int USER_INTERFACE_PROFILING_LIST_INCL_ESAPSED_TIME = 3;
+ public static final int USER_INTERFACE_PROFILING_LIST_EXCL_ESAPSED_TIME = 4;
+ public static final int USER_INTERFACE_PROFILING_LIST_EXCL_CPU_AVG_TIME = 5;
+ public static final int USER_INTERFACE_PROFILING_LIST_INCL_CPU_AVG_TIME = 6;
+ public static final int USER_INTERFACE_PROFILING_LIST_INCL_ESAPSED_AVG_TIME = 7;
+ public static final int USER_INTERFACE_PROFILING_LIST_EXCL_ESAPSED_AVG_TIME = 8;
+
+ private String strIndex = null;
+ private String strTime = null;
+ private String strKey = null;
+
+ private String strAPIName = null;
+ private String strExclCPUTime = null;
+ private String strInclCPUTime = null;
+ private String strInclEsapsedTime = null;
+ private String strExclEsapsedTime = null;
+ private String strExclCPUAvgTime = null;
+ private String strInclCPUAvgTime = null;
+ private String strInclEsapsedAvgTime = null;
+ private String strExclEsapsedAvgTime = null;
+
+
+ private String strParent = null;
+ private String strTreeKey = null;
+
+
+ private List<String> data = null;
+
+ private ArrayList<ProfilingData> profilingData = null;
+
+
+ public UserInterfaceFunctionProfilingData(String[] input) {
+ List<String> data = getData();
+ for (int i = 0; i < input.length; i++) {
+ data.add(input[i]);
+ }
+ }
+
+ public UserInterfaceFunctionProfilingData(List<String> input) {
+ if (null != input && !input.isEmpty()) {
+ getData().addAll(input);
+ }
+ }
+
+ public UserInterfaceFunctionProfilingData( ProfilingData input) {
+ if (null != input ) {
+ profilingData.add(input);
+ }
+ }
+
+ public UserInterfaceFunctionProfilingData( ) {
+
+ }
+
+
+
+
+ public List<String> getData() {
+ if (null == data) {
+ data = new ArrayList<String>();
+ }
+ return data;
+ }
+
+ public String getLogData(int logIndex) {
+ if (!getData().isEmpty()) {
+ return data.get(logIndex);
+ }
+ return null;
+ }
+
+ public void setIndex(String data ){
+ strIndex = data;
+ }
+ public String getIndex(){
+ return strIndex;
+ }
+ public void setKey(String data ){
+ strKey = data;
+ }
+ public String getKey(){
+ return strKey;
+ }
+
+ public void setTime(String data ){
+ strTime = data;
+ }
+ public String getTime(){
+ return Formatter.toTimeFormat( strTime );
+ }
+
+ public void setParent(String data ){
+ strParent = data;
+ }
+ public String getParent(){
+ if ( strParent == null ){
+ strParent = "root";
+ }
+ return strParent;
+ }
+ public void setTreeKey(String data ){
+ strTreeKey = data;
+ }
+ public String getTreeKey(){
+ return strTreeKey;
+ }
+
+
+ public void setAPINamee(String data ){
+ strAPIName = data;
+ }
+ public String getAPIName(){
+ return strAPIName;
+ }
+
+ public void setExclCPUTime(String data ){
+ strExclCPUTime = data;
+ }
+ public String getExclCPUTime(){
+ return strExclCPUTime;
+ }
+ public void setExclCPUAvgTime(String data ){
+ strExclCPUAvgTime = data;
+ }
+ public String getExclCPUAvgTime(){
+ return strExclCPUAvgTime;
+ }
+
+ public void setInclCPUTime(String data ){
+ strInclCPUTime = data;
+ }
+ public String getInclCPUTime(){
+ return strInclCPUTime;
+ }
+ public void setInclCPUAvgTime(String data ){
+ strInclCPUAvgTime = data;
+ }
+ public String getInclCPUAvgTime(){
+ return strInclCPUAvgTime;
+ }
+
+
+ public void setInclEsapsedTime(String data ){
+ strInclEsapsedTime = data;
+ }
+ public String getInclEsapsedTime(){
+ return strInclEsapsedTime;
+ }
+ public void setInclEsapsedAvgTime(String data ){
+ strInclEsapsedAvgTime = data;
+ }
+ public String getInclEsapsedAvgTime(){
+ return strInclEsapsedAvgTime;
+ }
+
+
+ public void setExclEsapsedTime(String data ){
+ strExclEsapsedTime = data;
+ }
+ public String getExclEsapsedTime(){
+ return strExclEsapsedTime;
+ }
+ public void setExclEsapsedAvgTime(String data ){
+ strExclEsapsedAvgTime = data;
+ }
+ public String getExclEsapsedAvgTime(){
+ return strExclEsapsedAvgTime;
+ }
+
+
+
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.profiling;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.TreeSet;
+
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
+import org.tizen.dynamicanalyzer.common.AnalyzerPaths;
+import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData;
+import org.tizen.dynamicanalyzer.utils.Formatter;
+
+public class UserInterfaceFunctionProfilingDataChecker {
+
+ List<UserInterfaceFunctionProfilingData> profilingList;
+ private TreeSet<String> userInterfaceFunctionTree = new TreeSet<String>();
+
+ public void addPfofilingData(ProfilingData input) {
+
+
+
+ String[] splitApiNameList = input.getName().split("::"); //$NON-NLS-1$
+ String strApiName = new String(splitApiNameList[splitApiNameList.length - 1].trim());
+ String strSearch = userInterfaceFunctionTree.ceiling(strApiName);
+
+ // System.out.println("strApiName : " + strApiName);
+
+ if ( getDataList().size() == 0 ){ // Re Factoring
+
+ UserInterfaceFunctionProfilingData fd = new UserInterfaceFunctionProfilingData();
+ String exTime = "-", inTime = "-", exeTime = "-", inExeTime = "-",exAvgTime = "-", inAvgTime = "-", exeAvgTime = "-", inExeAvgTime = "-"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+
+ fd.setIndex( input.getSequence() );
+ fd.setKey( input.getKey() );
+
+
+ fd.setAPINamee( input.getParent() );
+
+ fd.setExclCPUTime( exTime );
+ fd.setInclCPUTime( inTime );
+ fd.setInclEsapsedTime( exeTime );
+ fd.setExclEsapsedTime( inExeTime );
+
+ fd.setExclCPUAvgTime( exAvgTime );
+ fd.setInclCPUAvgTime( inAvgTime );
+ fd.setInclEsapsedAvgTime( exeAvgTime );
+ fd.setExclEsapsedAvgTime( inExeAvgTime );
+
+
+ getDataList().add(fd);
+ }
+
+
+ if (strSearch.equals(strApiName)) {
+
+ System.out.println("UI API Name : " + strApiName);
+
+
+ int nListSize = getDataList().size();
+ for( int i = 0 ; i < nListSize ; i++ ){
+ if ( getDataList().get( i ).getIndex().equals( input.getSequence() ) ){
+ getDataList().remove(i);
+ break;
+ }
+ }
+
+
+ UserInterfaceFunctionProfilingData fd = new UserInterfaceFunctionProfilingData();
+ FunctionUsageProfiler profiler = AnalyzerManager.getFunctionUserProfiler();
+ String exTime = "-", inTime = "-", exeTime = "-", inExeTime = "-",exAvgTime = "-", inAvgTime = "-", exeAvgTime = "-", inExeAvgTime = "-"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ try {
+ exTime = profiler.getCpuTime(input, true);
+ exAvgTime = getAvgTime(Integer.parseInt(exTime),input.getCallCount(), 2);
+ exTime = Formatter.toTimeFormat2(exTime);
+
+ inTime = profiler.getCpuTime(input, false);
+ inAvgTime = getAvgTime(Integer.parseInt(inTime),input.getCallCount(), 2);
+ inTime = Formatter.toTimeFormat2(inTime);
+
+
+ exeTime = Integer.toString(input.getElapsedTime());
+ exeTime = Formatter.toTimeFormat(exeTime);
+ exeAvgTime = getAvgTime(input.getElapsedTime(),input.getCallCount(), 1);
+
+ inExeTime = Integer.toString(input.getExclusiveElapsedTime());
+ inExeTime = Formatter.toTimeFormat(inExeTime);
+ inExeAvgTime = getAvgTime(input.getExclusiveElapsedTime(),input.getCallCount(), 1);
+
+ } catch (NumberFormatException e) {
+ // FIXME
+ e.printStackTrace();
+ }
+
+ fd.setIndex( input.getSequence() );
+ fd.setKey( input.getKey() );
+
+
+
+ fd.setAPINamee( input.getName() );
+
+ fd.setExclCPUTime( exTime );
+ fd.setInclCPUTime( inTime );
+ fd.setInclEsapsedTime( exeTime );
+ fd.setExclEsapsedTime( inExeTime );
+
+ fd.setExclCPUAvgTime( exAvgTime );
+ fd.setInclCPUAvgTime( inAvgTime );
+ fd.setInclEsapsedAvgTime( exeAvgTime );
+ fd.setExclEsapsedAvgTime( inExeAvgTime );
+
+ fd.setParent( input.getParent() );
+
+
+ getDataList().add(fd);
+ }
+
+ }
+
+ public UserInterfaceFunctionProfilingDataChecker() {
+ getUIApiList();
+ }
+
+ public List<UserInterfaceFunctionProfilingData> getDataList() {
+ if (null == profilingList) {
+ profilingList = new ArrayList<UserInterfaceFunctionProfilingData>();
+
+ }
+ return profilingList;
+ }
+
+ private String getAvgTime(int nTime, int nCount, int nType) {
+ String strRetrun = "00.000";
+ if (nTime == 0) {
+ return strRetrun;
+ } else if( nCount == 0){
+ strRetrun = Integer.toString(nTime);
+ }else {
+ int nAvgExeTime = (nTime / nCount);
+ strRetrun = Integer.toString(nAvgExeTime);
+ }
+
+ if (nType == 1) {
+ strRetrun = Formatter.toTimeFormat(strRetrun);
+ } else {
+ strRetrun = Formatter.toTimeFormat2(strRetrun);
+ }
+
+ return strRetrun;
+
+ }
+
+ private boolean getUIApiList() {
+
+ String configFileName = AnalyzerLabels.USER_INTERFACE_API_LIST_FILE_NAME;
+
+ File configFolder = new File(AnalyzerPaths.CONFIG_FOLDER_PATH);
+ if (!configFolder.isDirectory()) {
+ System.out.println("Not Exist Folder : " + configFolder);
+ return false;
+ }
+
+ File apiListFile = new File(configFolder, configFileName);
+ if (!apiListFile.isFile()) {
+ System.out.println("Not Exist File : " + apiListFile);
+ return false;
+ } else {
+ BufferedReader in;
+ String content;
+ try {
+ in = new BufferedReader(new FileReader(apiListFile));
+ String strInputData;
+ while (null != (content = in.readLine())) {
+ if (!content.equals("")) {
+ strInputData = content.trim();
+ userInterfaceFunctionTree.add(strInputData);
+ }
+ }
+ } catch (FileNotFoundException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ return true;
+ }
+}
--- /dev/null
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hyunjong Park <phjwithyou.park@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.dynamicanalyzer.ui.userinterface.profiling;
+
+import java.util.ArrayList;
+import java.util.List;
+
+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.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.model.TreeInput;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePageDataManager;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.TreeDataComparator;
+
+public class UserInterfaceFunctionProfilingTable extends DATreeComposite {
+
+ public UserInterfaceFunctionProfilingTable(Composite parent, int compStyle,
+ int tableStyle) {
+ super(parent, compStyle, tableStyle);
+ setComparator(new TreeDataComparator());
+ // setSelValueIndex(0);
+
+ comparator.setType(AnalyzerConstants.SORT_TYPE_NUM);
+ comparator.setColumn(2);
+ comparator.reverseDirection();
+
+ tree.addListener(SWT.Expand, new Listener() {
+
+ @Override
+ public void handleEvent(Event event) {
+ GridItem item = (GridItem) event.item;
+ setExpand(item, true);
+ }
+ });
+
+ tree.addListener(SWT.Collapse, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ GridItem item = (GridItem) event.item;
+ setExpand(item, false);
+ }
+ });
+
+ tree.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ // GridItem[] items = tree.getSelection();
+ // DASelectionData selData = new DASelectionData(
+ // FunctionUsageProfilingView.ID, 0, 0, items, tree);
+ // AnalyzerManager.getCurrentPage().updatePage(selData);
+ // AnalyzerManager.getCurrentPage().controlSelection(
+ // FunctionUsageProfilingView.ID);
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // TODO Auto-generated method stub
+ }
+ });
+
+ tree.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) {
+ GridItem[] items = (GridItem[]) tree.getSelection();
+ if (null == items || items.length == 0) {
+ return;
+ }
+ GridItem item = items[0];
+ if (item.isExpanded()) {
+ setExpand(item, false);
+ } else {
+ setExpand(item, true);
+ }
+ updateTree();
+ }
+ });
+ }
+
+ @Override
+ public void setColumns(String[] columnNames) {
+ int size = columnNames.length;
+ 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);
+ }
+ column.setCellRenderer(new UserInterfaceFunctionProfilingTableCellRenderer());
+ column.setHeaderRenderer(new DATableHeaderRenderer());
+ column.pack();
+
+ 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();
+ }
+ });
+ }
+ }
+ }
+
+ public List<ProfilingData> difference(ArrayList<ProfilingData> base,
+ ArrayList<ProfilingData> target) {
+ @SuppressWarnings("unchecked")
+ ArrayList<ProfilingData> result = (ArrayList<ProfilingData>) base.clone();
+ result.removeAll(target);
+ return result;
+ }
+
+
+
+
+
+ private TreeInput makeInput( UserInterfaceFunctionProfilingData input ) {
+
+ DATableDataFormat tableData = new DATableDataFormat( input.getIndex());
+ List<String> inputData = new ArrayList<String>();
+
+ // make input data
+ for (int i = 0; i < UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_COLUMN_SIZE; i++) {
+ inputData.add(""); //$NON-NLS-1$
+ }
+
+
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_API_NAME, input.getAPIName() );
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_CPU_TIME, input.getExclCPUTime() );
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_CPU_TIME, input.getInclCPUTime() );
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_ESAPSED_TIME, input.getInclEsapsedTime() );
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_ESAPSED_TIME, input.getExclEsapsedTime() );
+
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_CPU_AVG_TIME, input.getExclCPUAvgTime() );
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_CPU_AVG_TIME, input.getInclCPUAvgTime() );
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_INCL_ESAPSED_AVG_TIME, input.getInclEsapsedAvgTime() );
+ inputData.set(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_EXCL_ESAPSED_AVG_TIME, input.getExclEsapsedAvgTime() );
+
+ tableData.getData().addAll(inputData);
+ tableData.setObject(input.getAPIName());
+
+ List<String> text = new ArrayList<String>();
+
+ text.add(input.getAPIName());
+
+ text.add(input.getExclCPUTime());
+ text.add(input.getInclCPUTime());
+ text.add(input.getInclEsapsedTime());
+ text.add(input.getExclEsapsedTime());
+
+ text.add(input.getExclCPUAvgTime());
+ text.add(input.getInclCPUAvgTime());
+ text.add(input.getInclEsapsedAvgTime());
+ text.add(input.getExclEsapsedAvgTime());
+
+ TreeInput output = new TreeInput();
+ output.setText(text);
+ output.setData(tableData);
+ return output;
+ }
+
+
+ // !! recursive!!
+ public boolean makeChildTree(TreeInput nodeParent, TreeInput currentNode, String parentName, int nNodeDepth) {
+
+ String strParentName = nodeParent.getText().get(UserInterfaceFunctionProfilingData.USER_INTERFACE_PROFILING_LIST_API_NAME);
+ if (parentName.equals(strParentName)) {
+ nodeParent.getChildren().add(currentNode);
+ return true;
+ } else {
+ for (int i = 0; i < nodeParent.getChildren().size(); i++) {
+ if (makeChildTree(nodeParent.getChildren().get(i), currentNode, parentName, nNodeDepth++) == true ) {
+ break;
+ }
+ }
+ }
+ return false;
+ }
+
+
+ @Override
+ public List<TreeInput> makeTreeInput() {
+ UserInterfacePageDataManager tManager = UserInterfacePageDataManager.getInstance();
+ List<UserInterfaceFunctionProfilingData> controlList = tManager.getfunctionProfilingDataChecker().getDataList();
+ List<TreeInput> output = new ArrayList<TreeInput>();
+ int size = controlList.size();
+ int nNodeDepth = 0;
+ for (int i = 0; i < size; i++ ) {
+ TreeInput currentNode = makeInput( controlList.get(i) );
+ if ( controlList.get(i).getParent().equals("root")){ //$NON-NLS-1$
+ output.add( currentNode );
+ }else{
+ for (int j = 0; j < output.size(); j++) {
+ if ( makeChildTree( output.get(j), currentNode, controlList.get(i).getParent(), nNodeDepth++ ) == true ){
+ break;
+ }
+ }
+ }
+ }
+ return output;
+
+ }
+
+
+
+}
\ No newline at end of file
-package org.tizen.dynamicanalyzer.ui.userinterface;
+package org.tizen.dynamicanalyzer.ui.userinterface.profiling;
import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.nebula.widgets.grid.IInternalWidget;
*
*/
-package org.tizen.dynamicanalyzer.ui.userinterface;
+package org.tizen.dynamicanalyzer.ui.userinterface.profiling;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.ui.file.FileApiListView;
-import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData;
import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
public class UserInterfaceFunctionProfilingView extends DAView {
public static final String ID = FileApiListView.class.getName();
+
int[] innerMaxWeight = { 100, 0 };
int[] outerMaxWeight = { 0, 100 };
-
- private String[] columnNames = {
- UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0,
+
+ private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0,
UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_1,
UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_2,
UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_3,
UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_4,
- UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5 };
- private int[] columnSizes = { 200, 0, 0, 0, 0, 0 };
+ UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5,
+ UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_6,
+ UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_7,
+ UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_8
+ };
+ private int[] columnSizes = { 200, 0, 0, 0, 0, 0, 0, 0, 0 };
UserInterfaceFunctionProfilingTable treeComp = null;
- private boolean[] columnVisibility = { true, true, true, true, true, true };
+ private boolean[] columnVisibility = { true, 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 };
- int[] sourceColumns = { ProfilingData.NAME_INDEX,
- ProfilingData.EXCOUNT_INDEX, ProfilingData.EXCOUNT_INDEX,
- ProfilingData.INCOUNT_INDEX, ProfilingData.INCOUNT_INDEX,
- ProfilingData.CALLCOUNT_INDEX };
-
+ AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM};
+ int[] sourceColumns = { 1,2,3,4,5,6,7,8,9};
+
public UserInterfaceFunctionProfilingView(Composite parent, int style) {
super(parent, style);
this.setLayout(new FillLayout());
ViewContainer viewContainer = new ViewContainer(this, true);
- viewContainer
- .setTitleText(UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME);
+ viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME);
+
setMaxWeight(innerMaxWeight, outerMaxWeight);
-
+
Composite contents = viewContainer.getContentArea();
contents.setBackground(ColorResources.WINDOW_BG_COLOR);
contents.setLayout(new FillLayout());
- treeComp = new UserInterfaceFunctionProfilingTable(contents, SWT.NONE,
- SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL
- | SWT.V_SCROLL);
+ treeComp = new UserInterfaceFunctionProfilingTable(contents, SWT.NONE, SWT.SINGLE
+ | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
/*** setTree set first!!! ***/
treeComp.setTree(true);
treeComp.setSortTypes(sortTypes);
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.scene;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.utils.Formatter;
+
+public class SceneTransformData {
+ public static final int KEY_INDEX = LogCenterConstants.SEQUENCE_NUMBER_INDEX;
+
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_COLUMN_SIZE = 5;
+
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LISTL_SCENE_NAME = 0;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_TIME = 1;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME = 2;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME = 3;
+ public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_TRANSFORM_TIME = 4;
+
+ private String strIndex = null;
+ private String strTime = null;
+ private String strSceneName = null;
+ private String strTransformTime = null;
+ private String strFormName = null;
+ private String strPanelName = null;
+
+
+ private List<String> data;
+
+ public SceneTransformData(String[] input) {
+ List<String> data = getData();
+ for (int i = 0; i < input.length; i++) {
+ data.add(input[i]);
+ }
+ }
+
+ public SceneTransformData(List<String> input) {
+ if (null != input && !input.isEmpty()) {
+ getData().addAll(input);
+ }
+ }
+
+ public List<String> getData() {
+ if (null == data) {
+ data = new ArrayList<String>();
+ }
+ return data;
+ }
+
+ public String getLogData(int logIndex) {
+ if (!getData().isEmpty()) {
+ return data.get(logIndex);
+ }
+ return null;
+ }
+
+ public void setIndex(String data ){
+ strIndex = data;
+ }
+ public String getIndex(){
+ return strIndex;
+ }
+
+ public void setTime(String data ){
+ strTime = data;
+ }
+ public String getTime(){
+ return Formatter.toTimeFormat( strTime );
+ }
+
+ public void setSceneName(String data ){
+ strSceneName = data;
+ }
+ public String getSceneName(){
+ return strSceneName;
+ }
+
+ public void setTransformTime(String data ){
+ strTransformTime = data;
+ }
+ public String getTransformTime(){
+ return strTransformTime;
+ }
+
+ public void setFormName(String data ){
+ strFormName = data;
+ }
+ public String getFormName(){
+ return strFormName;
+ }
+
+ public void setPanelName(String data ){
+ strPanelName = data;
+ }
+ public String getPanelName(){
+ return strPanelName;
+ }
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.scene;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.common.CommonConstants;
+
+public class SceneTransformDataChecker {
+
+ List<SceneTransformData> transfomSceneList;
+
+ public void parserLog( List<String> input ){
+
+ String[] inputLog = new String[LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_DIRECTION_INDEX+1];
+
+ String[] slicedLog = null;
+ int size = input.size();
+
+ for (int i = 0, j = 0; i < size; i++) {
+ if (input.get(i).isEmpty()) {
+ continue;
+ }
+ String[] log = input.get(i).split(CommonConstants.NEW_LINE);
+ slicedLog = log[0].split(AnalyzerConstants.DATA_PARSING_TOKEN);
+
+ if ((i == LogCenterConstants.ID_INDEX)
+ || (i == LogCenterConstants.SEQUENCE_NUMBER_INDEX)
+ || (i == LogCenterConstants.APINAME_INDEX)
+ || (i == LogCenterConstants.TIME_INDEX)
+ || (i == LogCenterConstants.PROCESS_ID_INDEX)
+ || (i == LogCenterConstants.THREAD_ID_INDEX)
+ || (i == LogCenterConstants.INPUTPARM_INDEX)
+ || (i == LogCenterConstants.RETURN_INDEX)
+ || (i == LogCenterConstants.PCADDR_INDEX)
+ || (i == LogCenterConstants.ERROR_INDEX)
+ || (i == LogCenterConstants.INTERNAL_FLAG_INDEX)
+ || (i == LogCenterConstants.CALLER_PCADDR_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_SCENE_NAME_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_POINT_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME_INDEX)
+ || (i == LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_POINT_INDEX)
+ ) {
+ inputLog[j++] = slicedLog[0].toString();
+ }
+ }
+ addData(inputLog);
+ }
+
+ private void addData(String[] input) {
+ SceneTransformData fd = new SceneTransformData(input);
+
+ fd.setIndex( input[ LogCenterConstants.SEQUENCE_NUMBER_INDEX ] );
+ fd.setTime( input[ LogCenterConstants.TIME_INDEX ] );
+ fd.setSceneName( input[ LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_SCENE_NAME_INDEX ] );
+ fd.setFormName( input[ LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME_INDEX ] );
+ fd.setPanelName( input[ LogCenterConstants.USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME_INDEX ] );
+ fd.setTransformTime( getTransformTime() );
+
+ getDataList().add(fd);
+ }
+
+ public List<SceneTransformData> getDataList() {
+ if (null == transfomSceneList) {
+ transfomSceneList = new ArrayList<SceneTransformData>();
+ }
+ return transfomSceneList;
+ }
+
+
+ private String getTransformTime(){
+ return "00:00:456";
+ }
+
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.scene;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePageDataManager;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
+
+public class UserInterfaceSceneTransformListTable extends DATableComposite {
+
+ public UserInterfaceSceneTransformListTable(Composite parent, int style, int tableStyle) {
+ super(parent, style, tableStyle);
+ table.addSelectionListener(new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ // GridItem[] items = table.getSelection();
+ // DASelectionData selData = new DASelectionData(UserInterfaceSceneTransformListView.ID, 0, 0, items, table);
+ // AnalyzerManager.getCurrentPage().updatePage(selData);
+ // AnalyzerManager.getCurrentPage().controlSelection(UserInterfaceSceneTransformListView.ID);
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ }
+
+protected List<TableInput> makeTableInput() {
+
+ UserInterfacePageDataManager tManager = UserInterfacePageDataManager.getInstance();
+
+ List<SceneTransformData> transfomSceneList = tManager.getSceneTransformDataChecker().getDataList();
+
+ List<TableInput> input = new ArrayList<TableInput>();
+
+
+ int size = transfomSceneList.size();
+ for (int i = 0; i < size; i++) {
+
+ List<String> text = new ArrayList<String>();
+ SceneTransformData sceneTransformsData = transfomSceneList.get(i);
+
+ DATableDataFormat tableData = new DATableDataFormat( sceneTransformsData.getIndex() );
+
+ {
+ List<String> inputData = new ArrayList<String>();
+ for (int j = 0; j < SceneTransformData.USER_INTERFACE_SCENE_TRANSFORMS_LIST_COLUMN_SIZE; j++) {
+ inputData.add(""); //$NON-NLS-1$
+ }
+ inputData.set( SceneTransformData.USER_INTERFACE_SCENE_TRANSFORMS_LISTL_SCENE_NAME, sceneTransformsData.getSceneName() );
+ inputData.set( SceneTransformData.USER_INTERFACE_SCENE_TRANSFORMS_LIST_TIME, sceneTransformsData.getTime() );
+ inputData.set( SceneTransformData.USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME, sceneTransformsData.getFormName() );
+ inputData.set( SceneTransformData.USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME, sceneTransformsData.getPanelName() );
+ inputData.set( SceneTransformData.USER_INTERFACE_SCENE_TRANSFORMS_LIST_TRANSFORM_TIME, sceneTransformsData.getTransformTime() );
+ tableData.getData().addAll(inputData);
+ }
+ tableData.setObject(sceneTransformsData.getFormName());
+
+ text.add( sceneTransformsData.getSceneName() ); // Scene Name
+ text.add( sceneTransformsData.getTime() ); // Time
+ text.add( sceneTransformsData.getFormName() ); // Form Name
+ text.add( sceneTransformsData.getPanelName() ); // Panel Name
+ text.add( sceneTransformsData.getTransformTime() ); // Panel Name
+
+ TableInput tableInput = new TableInput();
+ tableInput.setText(text);
+ tableInput.setData(tableData);
+ input.add(tableInput);
+ }
+ return input;
+ }
+
+
+
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface.scene;
+
+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.common.DASelectionData;
+import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.model.DAView;
+import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.ui.file.FileApiListView;
+import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator;
+
+public class UserInterfaceSceneTransformListView extends DAView {
+
+ public static final String ID = FileApiListView.class.getName();
+
+ int[] innerMaxWeight = { 0, 100, 0 };
+ int[] outerMaxWeight = { 100, 0 };
+
+ private String[] columnNames = { UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_0
+ ,UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_1
+ ,UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_2
+ ,UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_3
+ ,UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_4
+ };
+ private int[] columnSizes = { 90, 80, 90, 90, 90 };
+
+ private boolean[] columnVisibility = { true, true, true, true, true };
+
+ DATableComposite tableComp = null;
+
+ int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING };
+
+ int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX,
+ LogCenterConstants.TIME_INDEX, LogCenterConstants.APINAME_INDEX,
+ LogCenterConstants.INPUTPARM_INDEX,
+ LogCenterConstants.RETURN_INDEX};
+
+ public UserInterfaceSceneTransformListView(Composite parent, int style) {
+ super(parent, style);
+ this.setLayout(new FillLayout());
+
+ ViewContainer viewContainer = new ViewContainer(this, true);
+ viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME);
+
+ setMaxWeight(innerMaxWeight, outerMaxWeight);
+
+ Composite contents = viewContainer.getContentArea();
+ contents.setBackground(ColorResources.WINDOW_BG_COLOR);
+ contents.setLayout(new FillLayout());
+ tableComp = new UserInterfaceSceneTransformListTable(contents, SWT.NONE, SWT.SINGLE
+ | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+ tableComp.setTableName(UserInterfacePageLabels.USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME);
+ tableComp.setComparator(new TableComparator());
+ tableComp.setSortTypes(sortTypes);
+ tableComp.setSourceColumns(sourceColumns);
+ tableComp.setColumns(columnNames);
+ tableComp.setColumnSize(columnSizes);
+ tableComp.setColumnVisibility(columnVisibility);
+ }
+
+
+
+ @Override
+ public void updateView(DASelectionData data) {
+ tableComp.updateTable();
+ }
+ @Override
+ public void updateView() {
+ tableComp.updateTable();
+
+ }
+ @Override
+ public Control getControl() {
+ return tableComp;
+ }
+
+ @Override
+ public void clear() {
+ tableComp.getTable().removeAll();
+ }
+}