--- /dev/null
+Clipboard,
+ClipboardItem,
+Container,
+Control,
+CustomControlBase,
+DataBindingContext,
+FocusManager,
+GridLayout,
+HorizontalBoxLayout,
+IActionEventListener,
+IAdjustmentEventListener,
+IAnimationEventListener,
+IClipboardPopupEventListener,
+IColorChangeEventListener,
+ICustomItemEventListener,
+IDataBindingDataTransformer,
+IDataBindingDataValidator,
+IDataBindingListener,
+IDateChangeEventListener,
+IDateTimeChangeEventListener,
+IDragDropEventListener,
+IExpandableItemEventListener,
+IFastScrollEventListener,
+IFocusEventListener,
+IGroupedItemEventListener,
+IInputConnectionEventListener,
+IInputConnectionProvider,
+IItemEventListener,
+IKeyEventListener,
+IKeypadEventListener,
+ILanguageEventListener,
+InputConnection,
+IOrientationEventListener,
+IProgressPopupEventListener,
+IScrollPanelEventListener,
+ISlidableGroupedListEventListener,
+ISlidableListEventListener,
+ITextBlockEventListener,
+ITextEventListener,
+ITimeChangeEventListener,
+ITouchCustomGestureEventListener,
+ITouchEventListener,
+ITouchFlickGestureEventListener,
+ITouchGestureEventListener,
+ITouchLongPressGestureEventListener,
+ITouchModeChangedEventListener,
+ITouchPanningGestureEventListener,
+ITouchPinchGestureEventListener,
+ITouchRotationGestureEventListener,
+ITouchTapGestureEventListener,
+IUiLinkEventListener,
+IWindowEventListener,
+KeyboardMap,
+KeyEventManager,
+Layout,
+RelativeLayout,
+Touch,
+TouchEventInfo,
+TouchEventManager,
+TouchFlickGestureDetector,
+TouchGestureDetector,
+TouchInfo,
+TouchLongPressGestureDetector,
+TouchPanningGestureDetector,
+TouchPinchGestureDetector,
+TouchRotationGestureDetector,
+TouchTapGestureDetector,
+Variant
\ No newline at end of file
public void postWindowOpen() {
PathManager.pathCheck();
+ DASingletonFocusManager.setSaveFocusDAPid();
IDECommunicator.startIDECommunicatorThread();
}
public static String COOLBAR_AREA_FILE;
public static String COOLBAR_AREA_SUMMARY;
public static String COOLBAR_AREA_THREAD;
+ public static String COOLBAR_AREA_UI;
public static String COOLBAR_AREA_TIMELINE;
public static String LICENSE_DIALOG_LICENSE_FILE_NAME;
public static String STOP_PROCESS_DLG_ERROR_1;
public static String STOP_PROCESS_DLG_ERROR_2;
public static String STOP_PROCESS_DLG_ERROR_3;
+
+ public static String USER_INTERFACE_API_LIST_FILE_NAME;
static {
NLS.initializeMessages(BUNDLE_NAME, AnalyzerLabels.class);
COOLBAR_AREA_FILE=File
COOLBAR_AREA_SUMMARY=Summary
COOLBAR_AREA_THREAD=Thread
+COOLBAR_AREA_UI=UI
COOLBAR_AREA_TIMELINE=Timeline
LICENSE_DIALOG_LICENSE_FILE_NAME=license
STOP_PROCESS_DLG_ERROR_1=error occurred(1)
STOP_PROCESS_DLG_ERROR_2=error occurred(2)
STOP_PROCESS_DLG_ERROR_3=error occurred(3)
+
+USER_INTERFACE_API_LIST_FILE_NAME=user_interface_api_list
\ No newline at end of file
--- /dev/null
+package org.tizen.dynamicanalyzer.nl;
+
+import org.eclipse.osgi.util.NLS;
+
+public class UserInterfacePageLabels extends NLS {
+
+ private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels"; //$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_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_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_1;
+ public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_2;
+ 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;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, UserInterfacePageLabels.class);
+ }
+
+ private UserInterfacePageLabels() {
+ }
+}
\ No newline at end of file
--- /dev/null
+
+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_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_SNAPSHOT_VIEW_NAME = Snapshot
+
+USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME = UI Function Profiling List View
+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_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
import org.tizen.dynamicanalyzer.ui.file.FilePage;
import org.tizen.dynamicanalyzer.ui.summary.SummaryPage;
import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
+import org.tizen.dynamicanalyzer.ui.userinterface.UserInterfacePage;
+
import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
final int ANALYSIS_INDEX = 1;
final int FILE_INDEX = 2;
final int THREAD_INDEX = 3; // FIXME
+ final int UI_INDEX = 4; // FIXME
List<DAPageComposite> comps;
private int currentStack = MAIN_INDEX;
DAPageComposite threadComp = new ThreadPage(containerComposite,
SWT.NONE);
comps.add(threadComp);
+
+ DAPageComposite userInterfaceComp = new UserInterfacePage(containerComposite,
+ SWT.NONE);
+ comps.add(userInterfaceComp);
containerLayout.topControl = comps.get(MAIN_INDEX);
containerComposite.layout();
.setSelectionTab(3);
}
});
+
+ ToolbarArea
+ .getInstance()
+ .getUIButton()
+ .addClickListener(
+ new DACustomButtonClickEventListener() {
+ @Override
+ public void handleClickEvent(
+ DACustomButton button) {
+ if (currentStack == UI_INDEX
+ || effectLock) {
+ return;
+ }
+ setTopComposite(UI_INDEX);
+ ToolbarArea.getInstance()
+ .setSelectionTab(UI_INDEX);
+ }
+ });
}
});
}
String rateStr = item.getText(getColumn());
String[] splitRateStr = rateStr.split("%"); //$NON-NLS-1$
rateStr = new String(splitRateStr[0].trim());
- if (!rateStr.equals("-")) {
+ String[] splitStr = rateStr.split(":"); //$NON-NLS-1$
+ if ( (!rateStr.equals("-")) && ( splitStr.length < 1) ) {
double rate = Double.parseDouble(rateStr);
Rectangle bounds = getBounds();
int rectWidth = (int) (bounds.width * (rate / 100));
private static final int TAB_ANALYSIS = 1;
private static final int TAB_FILE = 2;
private static final int TAB_THREAD = 3; // FIXME
+ private static final int TAB_UI = 4; // FIXME
+
private Cursor cursor;
private static int COMBO_FIRST_INDEX = 0;
public static boolean bThreadPageWork = false; // FIXME
+ public static boolean bUIPageWork = false; // FIXME
+
public static final int TOOLBAR_STATE_RECORDING = 0;
public static final int TOOLBAR_STATE_READY = 1;
private void createPageBar(Composite parent) {
pageTab = new ArrayList<DACustomButton>();
- pageTab.add(new DACustomButton(parent,
- ColorResources.TAB_NORMAL_COLOR_START,
- ColorResources.TAB_NORMAL_COLOR_END,
- ColorResources.TAB_PUSH_COLOR_START,
- ColorResources.TAB_PUSH_COLOR_END,
- ColorResources.TAB_HOVER_COLOR_START,
- ColorResources.TAB_HOVER_COLOR_END,
- ColorResources.TAB_SELECTED_COLOR_START,
- ColorResources.TAB_SELECTED_COLOR_END));
- pageTab.add(new DACustomButton(parent,
- ColorResources.TAB_NORMAL_COLOR_START,
- ColorResources.TAB_NORMAL_COLOR_END,
- ColorResources.TAB_PUSH_COLOR_START,
- ColorResources.TAB_PUSH_COLOR_END,
- ColorResources.TAB_HOVER_COLOR_START,
- ColorResources.TAB_HOVER_COLOR_END,
- ColorResources.TAB_SELECTED_COLOR_START,
- ColorResources.TAB_SELECTED_COLOR_END));
- pageTab.add(new DACustomButton(parent,
- ColorResources.TAB_NORMAL_COLOR_START,
- ColorResources.TAB_NORMAL_COLOR_END,
- ColorResources.TAB_PUSH_COLOR_START,
- ColorResources.TAB_PUSH_COLOR_END,
- ColorResources.TAB_HOVER_COLOR_START,
- ColorResources.TAB_HOVER_COLOR_END,
- ColorResources.TAB_SELECTED_COLOR_START,
- ColorResources.TAB_SELECTED_COLOR_END));
- pageTab.add(new DACustomButton(parent,
- ColorResources.TAB_NORMAL_COLOR_START,
- ColorResources.TAB_NORMAL_COLOR_END,
- ColorResources.TAB_PUSH_COLOR_START,
- ColorResources.TAB_PUSH_COLOR_END,
- ColorResources.TAB_HOVER_COLOR_START,
- ColorResources.TAB_HOVER_COLOR_END,
- ColorResources.TAB_SELECTED_COLOR_START,
- ColorResources.TAB_SELECTED_COLOR_END));
-
- pageTab.get(TAB_MAIN).setRenderer(new TabButtonRenderer());
- pageTab.get(TAB_MAIN).setFontColor(DACustomButton.STATE_NORMAL,
- ColorResources.TAB_NORMAL_FONT_COLOR);
- pageTab.get(TAB_MAIN).setFontColor(DACustomButton.STATE_PUSH,
- ColorResources.TAB_PUSH_FONT_COLOR);
- pageTab.get(TAB_MAIN).setFontColor(DACustomButton.STATE_HOVER,
- ColorResources.TAB_HOVER_FONT_COLOR);
- pageTab.get(TAB_MAIN).setFontColor(DACustomButton.STATE_DISABLE,
- ColorResources.TAB_SELECTED_FONT_COLOR);
- pageTab.get(TAB_MAIN).setOutlineColors(
- ColorResources.TAB_OUTLINE_NORMAL_COLOR,
- ColorResources.TAB_OUTLINE_PUSH_COLOR,
- ColorResources.TAB_OUTLINE_HOVER_COLOR,
- ColorResources.TAB_OUTLINE_SELECTED_COLOR);
-
- pageTab.get(TAB_MAIN).setEnabled(false);
- pageTab.get(TAB_MAIN).setFont(FontResources.TAB_BUTTON_FONT);
- pageTab.get(TAB_MAIN).setText(AnalyzerLabels.COOLBAR_AREA_TIMELINE);
-
- pageTab.get(TAB_ANALYSIS).setRenderer(new TabButtonRenderer());
- pageTab.get(TAB_ANALYSIS).setFontColor(DACustomButton.STATE_NORMAL,
- ColorResources.TAB_NORMAL_FONT_COLOR);
- pageTab.get(TAB_ANALYSIS).setFontColor(DACustomButton.STATE_PUSH,
- ColorResources.TAB_PUSH_FONT_COLOR);
- pageTab.get(TAB_ANALYSIS).setFontColor(DACustomButton.STATE_HOVER,
- ColorResources.TAB_HOVER_FONT_COLOR);
- pageTab.get(TAB_ANALYSIS).setFontColor(DACustomButton.STATE_DISABLE,
- ColorResources.TAB_SELECTED_FONT_COLOR);
- pageTab.get(TAB_ANALYSIS).setFont(FontResources.TAB_BUTTON_FONT);
- pageTab.get(TAB_ANALYSIS).setText(AnalyzerLabels.COOLBAR_AREA_SUMMARY);
- pageTab.get(TAB_ANALYSIS).setOutlineColors(
- ColorResources.TAB_OUTLINE_NORMAL_COLOR,
- ColorResources.TAB_OUTLINE_PUSH_COLOR,
- ColorResources.TAB_OUTLINE_HOVER_COLOR,
- ColorResources.TAB_OUTLINE_SELECTED_COLOR);
-
- pageTab.get(TAB_FILE).setRenderer(new TabButtonRenderer());
- pageTab.get(TAB_FILE).setFontColor(DACustomButton.STATE_NORMAL,
- ColorResources.TAB_NORMAL_FONT_COLOR);
- pageTab.get(TAB_FILE).setFontColor(DACustomButton.STATE_PUSH,
- ColorResources.TAB_PUSH_FONT_COLOR);
- pageTab.get(TAB_FILE).setFontColor(DACustomButton.STATE_HOVER,
- ColorResources.TAB_HOVER_FONT_COLOR);
- pageTab.get(TAB_FILE).setFontColor(DACustomButton.STATE_DISABLE,
- ColorResources.TAB_SELECTED_FONT_COLOR);
- pageTab.get(TAB_FILE).setFont(FontResources.TAB_BUTTON_FONT);
- pageTab.get(TAB_FILE).setText(AnalyzerLabels.COOLBAR_AREA_FILE);
- pageTab.get(TAB_FILE).setOutlineColors(
- ColorResources.TAB_OUTLINE_NORMAL_COLOR,
- ColorResources.TAB_OUTLINE_PUSH_COLOR,
- ColorResources.TAB_OUTLINE_HOVER_COLOR,
- ColorResources.TAB_OUTLINE_SELECTED_COLOR);
-
- pageTab.get(TAB_THREAD).setRenderer(new TabButtonRenderer());
- pageTab.get(TAB_THREAD).setFontColor(DACustomButton.STATE_NORMAL,
- ColorResources.TAB_NORMAL_FONT_COLOR);
- pageTab.get(TAB_THREAD).setFontColor(DACustomButton.STATE_PUSH,
- ColorResources.TAB_PUSH_FONT_COLOR);
- pageTab.get(TAB_THREAD).setFontColor(DACustomButton.STATE_HOVER,
- ColorResources.TAB_HOVER_FONT_COLOR);
- pageTab.get(TAB_THREAD).setFontColor(DACustomButton.STATE_DISABLE,
- ColorResources.TAB_SELECTED_FONT_COLOR);
- pageTab.get(TAB_THREAD).setFont(FontResources.TAB_BUTTON_FONT);
- pageTab.get(TAB_THREAD).setText(AnalyzerLabels.COOLBAR_AREA_THREAD);
- pageTab.get(TAB_THREAD).setOutlineColors(
- ColorResources.TAB_OUTLINE_NORMAL_COLOR,
- ColorResources.TAB_OUTLINE_PUSH_COLOR,
- ColorResources.TAB_OUTLINE_HOVER_COLOR,
- ColorResources.TAB_OUTLINE_SELECTED_COLOR);
+ for (int i = 0; i <= TAB_UI; i++){
+ pageTab.add(new DACustomButton(parent,
+ ColorResources.TAB_NORMAL_COLOR_START,
+ ColorResources.TAB_NORMAL_COLOR_END,
+ ColorResources.TAB_PUSH_COLOR_START,
+ ColorResources.TAB_PUSH_COLOR_END,
+ ColorResources.TAB_HOVER_COLOR_START,
+ ColorResources.TAB_HOVER_COLOR_END,
+ ColorResources.TAB_SELECTED_COLOR_START,
+ ColorResources.TAB_SELECTED_COLOR_END));
+
+
+ pageTab.get(i).setRenderer(new TabButtonRenderer());
+ pageTab.get(i).setFontColor(DACustomButton.STATE_NORMAL,
+ ColorResources.TAB_NORMAL_FONT_COLOR);
+ pageTab.get(i).setFontColor(DACustomButton.STATE_PUSH,
+ ColorResources.TAB_PUSH_FONT_COLOR);
+ pageTab.get(i).setFontColor(DACustomButton.STATE_HOVER,
+ ColorResources.TAB_HOVER_FONT_COLOR);
+ pageTab.get(i).setFontColor(DACustomButton.STATE_DISABLE,
+ ColorResources.TAB_SELECTED_FONT_COLOR);
+ pageTab.get(i).setOutlineColors(
+ ColorResources.TAB_OUTLINE_NORMAL_COLOR,
+ ColorResources.TAB_OUTLINE_PUSH_COLOR,
+ ColorResources.TAB_OUTLINE_HOVER_COLOR,
+ ColorResources.TAB_OUTLINE_SELECTED_COLOR);
+
+
+ if ( i == TAB_MAIN){
+ pageTab.get(i).setEnabled(false);
+ pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_TIMELINE);
+ }else if ( i == TAB_ANALYSIS){
+ pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_SUMMARY);
+ }else if ( i == TAB_FILE){
+ pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_FILE);
+ }else if ( i == TAB_THREAD){
+ pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_THREAD);
+ }else if ( i == TAB_UI){
+ pageTab.get(i).setText(AnalyzerLabels.COOLBAR_AREA_UI);
+ }else{
+ System.out.print("Tab Count Error - "+ i);
+ }
+ pageTab.get(i).setFont(FontResources.TAB_BUTTON_FONT);
+ }
+
Composite whiteLine = new Composite(parent, SWT.NONE);
whiteLine.setBackground(ColorResources.WHITE);
data.height = 0;
}
pageTab.get(TAB_THREAD).setLayoutData(data);
-
+
+ // FIXME
data = new FormData();
data.left = new FormAttachment(pageTab.get(TAB_THREAD), 0);
+ if (true == bUIPageWork) {
+ data.width = PAGE_BUTTON_WIDTH;
+ data.height = PAGE_BUTTON_HEIGHT;
+ } else {
+ data.width = 0;
+ data.height = 0;
+ }
+ pageTab.get(TAB_UI).setLayoutData(data);
+
+
+ data = new FormData();
+ data.left = new FormAttachment(pageTab.get(TAB_UI), 0);
data.right = new FormAttachment(100, 0);
data.bottom = new FormAttachment(100, 0);
data.top = new FormAttachment(0, 0);
// tab, set selection
public void setSelectionTab(int nTab) {
- for (int i = 0; i <= TAB_THREAD; i++) {
+ for (int i = 0; i <= TAB_UI; i++) {
if (i == nTab)
pageTab.get(i).setEnabled(false);
else
public DACustomButton getThreadButton() {
return pageTab.get(TAB_THREAD);
}
+
+ public DACustomButton getUIButton() {
+ return pageTab.get(TAB_UI);
+ }
public boolean isRunnigDA() {
boolean bRunning = false;
--- /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.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.DASelectionData;
+import org.tizen.dynamicanalyzer.listeners.TableTooltipListener;
+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.summary.profiling.ProfilingData;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingTable;
+import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+
+public class UserInterfaceControlListView extends DAView {
+
+ public static final String ID = FileApiListView.class.getName();
+
+ 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 };
+
+ 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};
+
+ public UserInterfaceControlListView(Composite parent, int style) {
+ super(parent, style);
+ this.setLayout(new FillLayout());
+
+ ViewContainer viewContainer = new ViewContainer(this, true);
+ viewContainer.setTitleText(UserInterfacePageLabels.USERINTERFACE_CONTROL_LIST_VIEW_NAME);
+
+ 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);
+ /*** setTree set first!!! ***/
+ treeComp.setTree(true);
+ treeComp.setSortTypes(sortTypes);
+ treeComp.setSourceColumns(sourceColumns);
+ treeComp.setColumns(columnNames);
+ treeComp.setColumnSize(columnSizes);
+ treeComp.setColumnVisibility(columnVisibility);
+ treeComp.setTableToolTipListener(null);
+ }
+
+ @Override
+ public void updateView() {
+ treeComp.updateTree();
+ }
+
+ @Override
+ public void clear() {
+ treeComp.clear();
+ }
+
+ @Override
+ public Control getControl() {
+ return treeComp;
+ }
+
+ @Override
+ public void otherViewSelectionOccured() {
+ treeComp.deselectAll();
+ }
+}
\ 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.listeners.TableTooltipListener;
+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.DAPageAPIListTable;
+import org.tizen.dynamicanalyzer.ui.file.FileApiListView;
+import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+
+public class UserInterfaceFormBasedLeakListView extends DAView {
+
+ public static final String ID = FileApiListView.class.getName();
+
+ 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 };
+
+ DATableComposite tableComp = null;
+
+ 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);
+
+ Composite contents = viewContainer.getContentArea();
+ contents.setBackground(ColorResources.WINDOW_BG_COLOR);
+ contents.setLayout(new FillLayout());
+ tableComp = new DAPageAPIListTable(contents, SWT.NONE, SWT.SINGLE
+ | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+ tableComp.setColumns(columnNames);
+ tableComp.setColumnSize(columnSizes);
+
+ tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
+ .getTable(), false));
+ }
+
+ @Override
+ public void setSourceView(boolean enable) {
+ tableComp.setSourceView(enable);
+ }
+
+ @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
+/*
+ * 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;
+
+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.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.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.FunctionUsageProfilingTableCellRenderer;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData;
+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 {
+
+ private TreeSet<String> userInterfaceFunctionTree = new TreeSet<String>();
+
+ 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();
+
+ getUIApiList();
+
+ 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 FunctionUsageProfilingTableCellRenderer());
+ 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(ProfilingData input, int inputType) {
+ // table data
+ DATableDataFormat tableData = new DATableDataFormat(input.getSequence());
+
+ // 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();
+ }
+ 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);
+
+ 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);
+
+ 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;
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public List<TreeInput> makeTreeInput() {
+ 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);
+ }
+ output.add(appBinInput);
+ }
+ return output;
+ }
+
+ 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;
+ }
+
+}
\ No newline at end of file
--- /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;
+
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.model.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.summary.profiling.ProfilingData;
+import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
+
+public class UserInterfaceFunctionProfilingView extends DAView {
+
+ public static final String ID = FileApiListView.class.getName();
+
+ 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 };
+ 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};
+
+ 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);
+
+ 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);
+ /*** setTree set first!!! ***/
+ treeComp.setTree(true);
+ treeComp.setSortTypes(sortTypes);
+ treeComp.setSourceColumns(sourceColumns);
+ treeComp.setColumns(columnNames);
+ treeComp.setColumnSize(columnSizes);
+ treeComp.setColumnVisibility(columnVisibility);
+ treeComp.setTableToolTipListener(null);
+ }
+
+ @Override
+ public void updateView() {
+ treeComp.updateTree();
+ }
+
+ @Override
+ public void clear() {
+ treeComp.clear();
+ }
+
+ @Override
+ public Control getControl() {
+ return treeComp;
+ }
+
+ @Override
+ public void otherViewSelectionOccured() {
+ treeComp.deselectAll();
+ }
+}
\ No newline at end of file
--- /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;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.logparser.LogPackage;
+import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
+import org.tizen.dynamicanalyzer.ui.timeline.DATimelineTabComposite;
+import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView;
+import org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels;
+
+public class UserInterfacePage extends DAPageComposite {
+
+ SashForm baseForm;
+ SashForm upperForm;
+ SashForm bottomForm;
+
+
+ UserInterfacePageDataManager tManager = UserInterfacePageDataManager.getInstance();
+
+ public UserInterfacePage(Composite parent, int style) {
+ super(parent, style);
+ 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);
+ addView(topLeftFirst);
+
+ UserInterfaceSceneTransformListView topLeftSecond = new UserInterfaceSceneTransformListView(upperForm, SWT.NONE);
+ addView(topLeftSecond);
+
+ DATimelineTabComposite topLeftThird = new DATimelineTabComposite(upperForm, SWT.NONE);
+ addView(topLeftThird);
+ {
+ SnapshotView currentView = new SnapshotView(topLeftThird.getContentComposite(), SWT.NONE, false);
+ topLeftThird.addSnapshotView(currentView, UserInterfacePageLabels.USERINTERFACE_SNAPSHOT_VIEW_NAME);
+ }
+
+ upperForm.setWeights(new int[] { 35, 35, 30 });
+
+ bottomForm = new SashForm(baseForm, SWT.HORIZONTAL);
+ UserInterfaceFunctionProfilingView bottomLeftFirst = new UserInterfaceFunctionProfilingView(bottomForm, SWT.NONE);
+ addView(bottomLeftFirst);
+
+ UserInterfaceFormBasedLeakListView bottomLeftSecond = new UserInterfaceFormBasedLeakListView(bottomForm, SWT.NONE);
+ addView(bottomLeftSecond);
+ bottomForm.setWeights(new int[] { 60, 40 });
+ }
+
+ public void updateLog(LogPackage logPack) {
+// System.out.println(" updateLog " + logPack.toString());
+ tManager.parsePageData(logPack);
+ }
+}
\ No newline at end of file
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.userinterface;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.graphics.Color;
+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;
+
+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, };
+
+ 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 };
+
+ public static UserInterfacePageDataManager getInstance() {
+ if (null == instance) {
+ instance = new UserInterfacePageDataManager();
+ }
+ return instance;
+ }
+
+ private UserInterfacePageDataManager() {
+ }
+
+ @Override
+ public PageDataColumn registePageDataColumn() {
+ // TODO Auto-generated method stub
+ PageDataColumn pageColumn = new PageDataColumn(THREAD_PAGE_COLUMN_COUNT, columnNames, columnAttribute);
+ return pageColumn;
+ }
+
+ @Override
+ public List<List<String>> getLogsFromLogPackage(LogPackage logPack) {
+
+ Logs logs = logPack.getLogs(LogCenterConstants.LOG_RESOURCE);
+ if (null == logs || logs.getLogs().size() == 0) {
+ return null;
+ }
+
+
+ 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;
+ }
+ 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 addPageChartItem(PageDataItem dataItem, int itemIndex) {
+ List<PageChartItem> items = pageChart.getItems();
+ System.out.println(" addPageChartItem " );
+
+ int graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE;
+ Color eventColor;
+ boolean bInternalStart = false;
+
+ 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;
+ }
+
+ 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() + ")");
+ }
+ 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;
+ }
+
+ @Override
+ public boolean errorCheck(List<String> input) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void clear() {
+ super.clear();
+ // mainThreadItem = null;
+ // instance = null;
+ }
+}
\ 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.listeners.TableTooltipListener;
+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.DAPageAPIListTable;
+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();
+
+ 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);
+
+ Composite contents = viewContainer.getContentArea();
+ contents.setBackground(ColorResources.WINDOW_BG_COLOR);
+ contents.setLayout(new FillLayout());
+ tableComp = new DAPageAPIListTable(contents, SWT.NONE, SWT.SINGLE
+ | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+ tableComp.setColumns(columnNames);
+ tableComp.setColumnSize(columnSizes);
+
+ tableComp.setTableToolTipListener(new TableTooltipListener(tableComp
+ .getTable(), false));
+ }
+
+ @Override
+ public void setSourceView(boolean enable) {
+ tableComp.setSourceView(enable);
+ }
+
+ @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();
+ }
+}