Setting : add UI Hierarchy template in setting dialog
authorheeyoung <heeyoung1008.hwang@samsung.com>
Fri, 19 Feb 2016 04:07:56 +0000 (13:07 +0900)
committergreatim <jaewon81.lim@samsung.com>
Fri, 19 Feb 2016 04:41:36 +0000 (13:41 +0900)
Change-Id: I3fec0882b16bda0b8f663f0a5cbeb80cd47bc63a
Signed-off-by: heeyoung <heeyoung1008.hwang@samsung.com>
Conflicts:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialogTemplatePage.java

Change-Id: I0e7645200b8a4b20e2fd69a224dc5a86a27b34ba
Signed-off-by: greatim <jaewon81.lim@samsung.com>
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/resources/ImageResources.java
org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_hierarchyviewer.png [new file with mode: 0644]
org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/setting
org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/template
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/Template.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialog.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialogTemplatePage.java

index a925114..6c762b9 100644 (file)
@@ -446,6 +446,7 @@ public class ImageResources {
        public static final Image TEMPLATE_NETWORK_ANALYSIS = getPngImage("feature_template_network"); //$NON-NLS-1$
        public static final Image TEMPLATE_OPEN_GL_ANALYSIS = getPngImage("feature_template_opengl"); //$NON-NLS-1$
        public static final Image TEMPLATE_ENERGY = getPngImage("feature_template_energy"); //$NON-NLS-1$
+       public static final Image TEMPLATE_UI_HIERARCHY_ANALYSIS = getPngImage("feature_template_hierarchyviewer"); //$NON-NLS-1$
        public static final Image TEMPLATE_CUSTOM = getPngImage("feature_template_custom"); //$NON-NLS-1$
        
        public static final Image OVERHEAD_BAR = getPngImage("overhead_bar"); //$NON-NLS-1$
@@ -525,4 +526,4 @@ public class ImageResources {
        private static Image getGifImage(String imageName) {
                return getImage(imageName, CommonConstants.EXTENSION_GIF_IMAGE);
        }
-}
\ No newline at end of file
+}
diff --git a/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_hierarchyviewer.png b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_hierarchyviewer.png
new file mode 100644 (file)
index 0000000..97436f5
Binary files /dev/null and b/org.tizen.dynamicanalyzer.appearance/theme/white/img/feature_template_hierarchyviewer.png differ
index b0efd6f..2a8f16e 100644 (file)
@@ -7,13 +7,13 @@ Options Selected Feature List|5002:0
 Default Feature List|2|3|103
 Total Overhead Range|1000000|3000000|7000000|15000000
 mobile|Protocol Version|4.0
-mobile|Available Template List|1|2|3|4|5|6|7|8|9|10
+mobile|Available Template List|1|2|3|4|5|6|7|8|9|10|11
 mobile|Selected Template|1
 mobile|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204|206
 mobile|Selected Feature List|1|5|1000:1000|100|101|1001:10
 mobile|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
 wearable|Protocol Version|3.0
-wearable|Available Template List|1|2|3|4|5|6|7|8|9|10
+wearable|Available Template List|1|2|3|4|5|6|7|8|9|10|11
 wearable|Selected Template|1
 wearable|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204|206
 wearable|Selected Feature List|1|5|1000:1000|100|101|1001:10
index 307eb6f..24fade9 100644 (file)
@@ -7,4 +7,5 @@
 7|Network|1|7|1000:1000|202
 8|OpenGL|1|5|1000:1000|100|203
 9|Energy|1|5|4|9|1000:1000
-10|Custom
+10|UI Hierarchy|206
+11|Custom
\ No newline at end of file
index 6ba7bbf..be4910f 100644 (file)
@@ -76,6 +76,7 @@ public class ConfigureLabels extends NLS {
        public static String TEMPLATE_NAME_NETWORK;
        public static String TEMPLATE_NAME_OPEN_GL;
        public static String TEMPLATE_NAME_ENERGY;
+       public static String TEMPLATE_NAME_UI_HIERARCHY;
        public static String TEMPLATE_NAME_CUSTOM;
        
        public static String TEMPLATE_DESCRIPTION_BOTTLENECK;
@@ -87,6 +88,7 @@ public class ConfigureLabels extends NLS {
        public static String TEMPLATE_DESCRIPTION_NETWORK;
        public static String TEMPLATE_DESCRIPTION_OPEN_GL;
        public static String TEMPLATE_DESCRIPTION_ENERGY;
+       public static String TEMPLATE_DESCRIPTION_UI_HIERARCHY;
        public static String TEMPLATE_DESCRIPTION_CUSTOM;
        
        public static String FEATURE_NAME_SYSTEM; // 3.0 only
index 53495e9..f563713 100644 (file)
@@ -43,6 +43,7 @@ TEMPLATE_NAME_WAIT_STATUS=Wait Status
 TEMPLATE_NAME_NETWORK=Network
 TEMPLATE_NAME_OPEN_GL=OpenGL
 TEMPLATE_NAME_ENERGY=Energy
+TEMPLATE_NAME_UI_HIERARCHY=UI Hierarchy
 TEMPLATE_NAME_CUSTOM=Custom
 
 TEMPLATE_DESCRIPTION_BOTTLENECK=This template shows where can be the most bottleneck point while you are using your program. With the CPU and process chart, you can easily find where the application uses the CPU a lot. And the function profiling and call trace information shows the bottleneck point with the view of function level.
@@ -54,6 +55,7 @@ TEMPLATE_DESCRIPTION_WAIT_STATUS=This template shows various information that ca
 TEMPLATE_DESCRIPTION_NETWORK=This template shows the TCP/UDP network activity of the glibc socket. The Network chart shows each session information. And you can check which API has been called in each session and can see the transmitted data, too.
 TEMPLATE_DESCRIPTION_OPEN_GL=This template shows a lot of detailed information of the openGL layer. It shows the FPS, render state, openGL calls, statistics and redundant usage of the API. These help you to optimize the performance of your application. We are supporting OpenGL ES 2.0 and EvasGL, now.
 TEMPLATE_DESCRIPTION_ENERGY=This template inform you of power consumption of target device. you can see this information from Energy chart in Timeline page. Energy chart shows usage of Flash memory, CPU, LCD.
+TEMPLATE_DESCRIPTION_UI_HIERARCHY=This template shows the information of EFL UI objects (Evas, Elementary, Edje). You can see the hierarchy relationship of all UI objects and the detailed information of each UI object.
 TEMPLATE_DESCRIPTION_CUSTOM=This template can be configured by selecting the desired features. If you change the feature in the other template will change custom template.
 
 FEATURE_NAME_SYSTEM=System
index 99b4e25..d94ac4d 100644 (file)
@@ -49,7 +49,9 @@ public enum Template {
                        ConfigureLabels.TEMPLATE_DESCRIPTION_OPEN_GL),
        TEMPLATE_ENERGY(9, ConfigureLabels.TEMPLATE_NAME_ENERGY,
                        ConfigureLabels.TEMPLATE_DESCRIPTION_ENERGY),
-       TEMPLATE_CUSTOM(10, ConfigureLabels.TEMPLATE_NAME_CUSTOM,
+       TEMPLATE_UI_HIERARCHY(10, ConfigureLabels.TEMPLATE_NAME_UI_HIERARCHY,
+                       ConfigureLabels.TEMPLATE_DESCRIPTION_UI_HIERARCHY),
+       TEMPLATE_CUSTOM(11, ConfigureLabels.TEMPLATE_NAME_CUSTOM,
                        ConfigureLabels.TEMPLATE_DESCRIPTION_CUSTOM);
 
        private static final Map<Integer, Template> templateByIndex = new HashMap<Integer, Template>();
index 2ee72ab..58b4ac2 100644 (file)
@@ -153,7 +153,7 @@ public class SettingDialog extends DAMessageBox {
                        return false;
                }
                IDECommunicator.setOpenWelcomeDlg(true);
-               shell.setSize(611, 520);
+               shell.setSize(631, 520);
                shell.setLayout(new FormLayout());
                shell.setText(AnalyzerLabels.SETTING_TITLE);
                shell.setBackground(ColorResources.CONFIGURATION_TABLE_COVER_BACKGROUND_COLOR);
index ff38b58..26a08aa 100644 (file)
@@ -53,6 +53,7 @@ import org.tizen.dynamicanalyzer.setting.SettingDataManager;
 import org.tizen.dynamicanalyzer.setting.TargetData;
 import org.tizen.dynamicanalyzer.setting.Template;
 import org.tizen.dynamicanalyzer.setting.TemplateData;
+import org.tizen.dynamicanalyzer.util.CommonUtil;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener;
 import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton;
@@ -60,22 +61,24 @@ import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButtonGroup
 import org.tizen.dynamicanalyzer.widgets.da.base.DAButton;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
 
-public class SettingDialogTemplatePage extends DAPageComposite {       
+public class SettingDialogTemplatePage extends DAPageComposite {
        private enum ProfileDisplayInfo {
-               PROFILE_NAME_MOBILE(0, ConfigureLabels.TARGET_NAME_MOBILE, ImageResources.TARGET_NAME_MOBILE),                          
+               PROFILE_NAME_MOBILE(0, ConfigureLabels.TARGET_NAME_MOBILE,
+                               ImageResources.TARGET_NAME_MOBILE),
                PROFILE_NAME_TV(1, ConfigureLabels.TARGET_NAME_TV, ImageResources.TARGET_NAME_TV),
-               PROFILE_NAME_WEARABLE(2, ConfigureLabels.TARGET_NAME_WEARABLE, ImageResources.TARGET_NAME_WEARABLE);
-               
+               PROFILE_NAME_WEARABLE(2, ConfigureLabels.TARGET_NAME_WEARABLE,
+                               ImageResources.TARGET_NAME_WEARABLE);
+
                private int id = -1;
                private String displayName = null;
                private Image image = null;
-               
+
                private ProfileDisplayInfo(int id, String displayName, Image image) {
                        this.id = id;
                        this.displayName = displayName;
                        this.image = image;
                }
-               
+
                public static Image getImage(String displayName) {
                        ProfileDisplayInfo[] profiles = ProfileDisplayInfo.values();
                        for (ProfileDisplayInfo profile : profiles) {
@@ -86,39 +89,41 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                        return null;
                }
        };
-       
+
        private enum TemplateDisplayInfo {
-               TEMPLATE_NAME_BOTTLENECK(0, ConfigureLabels.TEMPLATE_NAME_BOTTLENECK, 
+               TEMPLATE_NAME_BOTTLENECK(0, ConfigureLabels.TEMPLATE_NAME_BOTTLENECK,
                                ImageResources.TEMPLATE_BOTTLENECK_ANALYSIS),
-               TEMPLATE_NAME_MEMORY_LEAKS(1, ConfigureLabels.TEMPLATE_NAME_MEMORY_LEAKS, 
+               TEMPLATE_NAME_MEMORY_LEAKS(1, ConfigureLabels.TEMPLATE_NAME_MEMORY_LEAKS,
                                ImageResources.TEMPLATE_MEMORY_LEAK),
-               TEMPLATE_NAME_PROCESS_ACTIVITY(2, ConfigureLabels.TEMPLATE_NAME_PROCESS_ACTIVITY, 
+               TEMPLATE_NAME_PROCESS_ACTIVITY(2, ConfigureLabels.TEMPLATE_NAME_PROCESS_ACTIVITY,
                                ImageResources.TEMPLATE_PROCESS_ACTIVITY),
-               TEMPLATE_NAME_FILE(3, ConfigureLabels.TEMPLATE_NAME_FILE, 
+               TEMPLATE_NAME_FILE(3, ConfigureLabels.TEMPLATE_NAME_FILE,
                                ImageResources.TEMPLATE_FILE_ANALYSIS),
-               TEMPLATE_NAME_THREAD_ACTIVITY(4, ConfigureLabels.TEMPLATE_NAME_THREAD_ACTIVITY, 
+               TEMPLATE_NAME_THREAD_ACTIVITY(4, ConfigureLabels.TEMPLATE_NAME_THREAD_ACTIVITY,
                                ImageResources.TEMPLATE_THREAD_ACTIVITY_ANALYSIS),
-               TEMPLATE_NAME_WAIT_STATUS(5, ConfigureLabels.TEMPLATE_NAME_WAIT_STATUS, 
+               TEMPLATE_NAME_WAIT_STATUS(5, ConfigureLabels.TEMPLATE_NAME_WAIT_STATUS,
                                ImageResources.TEMPLATE_WAIT_STATUS_ANALYSIS),
-               TEMPLATE_NAME_NETWORK(6, ConfigureLabels.TEMPLATE_NAME_NETWORK, 
+               TEMPLATE_NAME_NETWORK(6, ConfigureLabels.TEMPLATE_NAME_NETWORK,
                                ImageResources.TEMPLATE_NETWORK_ANALYSIS),
-               TEMPLATE_NAME_OPEN_GL(7, ConfigureLabels.TEMPLATE_NAME_OPEN_GL, 
+               TEMPLATE_NAME_OPEN_GL(7, ConfigureLabels.TEMPLATE_NAME_OPEN_GL,
                                ImageResources.TEMPLATE_OPEN_GL_ANALYSIS),
-               TEMPLATE_NAME_ENERGY(8, ConfigureLabels.TEMPLATE_NAME_ENERGY, 
+               TEMPLATE_NAME_ENERGY(8, ConfigureLabels.TEMPLATE_NAME_ENERGY,
                                ImageResources.TEMPLATE_ENERGY),
-               TEMPLATE_NAME_CUSTOM(9, ConfigureLabels.TEMPLATE_NAME_CUSTOM, 
+               TEMPLATE_NAME_HIERARCHY_VIEWER(9, ConfigureLabels.TEMPLATE_NAME_UI_HIERARCHY,
+                               ImageResources.TEMPLATE_UI_HIERARCHY_ANALYSIS),
+               TEMPLATE_NAME_CUSTOM(10, ConfigureLabels.TEMPLATE_NAME_CUSTOM,
                                ImageResources.TEMPLATE_CUSTOM);
-               
+
                private int id = -1;
                private String displayName = null;
                private Image image = null;
-               
+
                private TemplateDisplayInfo(int id, String displayName, Image image) {
                        this.id = id;
                        this.displayName = displayName;
                        this.image = image;
                }
-               
+
                public static Image getImage(String displayName) {
                        TemplateDisplayInfo[] templates = TemplateDisplayInfo.values();
                        for (TemplateDisplayInfo template : templates) {
@@ -306,7 +311,7 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                        compData.top = new FormAttachment(0, 41);
                        compData.left = new FormAttachment(0, 6);
                        compData.width = 86;
-                       compData.height = 373;
+                       compData.height = 403;
                        targetComp.setLayoutData(compData);
                        targetComp.setBackground(ColorResources.WHITE);
 
@@ -383,7 +388,7 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                        TargetData target = entry.getValue();
 
                        DACustomToggleButton toggle = createToggleButton(targetInputComposite,
-                                       ProfileDisplayInfo.getImage(target.getTargetName()), imagePoint, 
+                                       ProfileDisplayInfo.getImage(target.getTargetName()), imagePoint,
                                        target.getTargetName(), fontPoint, 76, 76, topPosition, leftPosition);
                        targetGroup.addToggleButton(toggle);
 
@@ -414,6 +419,9 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                        }
                }
                targetComp.layout(true);
+               targetInputComposite.layout();
+               targetScrolledComposite.setMinSize(targetInputComposite.computeSize(SWT.DEFAULT,
+                               SWT.DEFAULT));
 
                if (!DAState.isStartable()) {
                        targetComp.setEnabled(false);
@@ -428,9 +436,9 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                        descriptionComp = new Composite(this, SWT.NONE);
                        descriptionComp.setLayout(new FormLayout());
                        FormData compData = new FormData();
-                       compData.top = new FormAttachment(0, 235);
+                       compData.top = new FormAttachment(0, 265);
                        compData.left = new FormAttachment(0, 98);
-                       compData.width = 504;
+                       compData.width = 524;
                        compData.height = 179;
                        descriptionComp.setLayoutData(compData);
                        descriptionComp.setBackground(ColorResources.WHITE);
@@ -573,8 +581,8 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                        FormData compData = new FormData();
                        compData.top = new FormAttachment(0, 41);
                        compData.left = new FormAttachment(0, 98);
-                       compData.width = 504;
-                       compData.height = 188;
+                       compData.width = 524;
+                       compData.height = 218;
                        templateComp.setLayoutData(compData);
                        templateComp.setBackground(ColorResources.WHITE);
 
@@ -590,7 +598,7 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                                        e.gc.drawLine(0, 22, rect.width - 1, 22);
 
                                        e.gc.setBackground(ColorResources.SETTING_TITLE_BACKGROUND);
-                                       e.gc.fillRectangle(1, 1, 502, 21);
+                                       e.gc.fillRectangle(1, 1, 522, 21);
 
                                }
                        });
@@ -643,8 +651,13 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                DACustomToggleButtonGroup targetGroup = new DACustomToggleButtonGroup();
                Point imagePoint = new Point(23, 8);
                Point fontPoint = new Point(-1, 60);
+               int defaultLeftPosition = 21; // linux, mac
+               if (CommonUtil.isWin()) {
+                       defaultLeftPosition = 13;
+               }
+
                int topPosition = 4;
-               int leftPosition = 13;
+               int leftPosition = defaultLeftPosition;
 
                TargetData target = SettingDataManager.INSTANCE.getTarget(selectedTarget);
                Template selectedTemplate = target.getSelectedTemplate();
@@ -685,7 +698,7 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                        if (leftPosition + 96 < 480) {
                                leftPosition += 96;
                        } else {
-                               leftPosition = 13;
+                               leftPosition = defaultLeftPosition;
                                topPosition += 79;
                        }
 
@@ -696,6 +709,8 @@ public class SettingDialogTemplatePage extends DAPageComposite {
                }
 
                templateComp.layout(true);
+               inputComposite.layout();
+               scrolledComposite.setMinSize(inputComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
 
                if (!DAState.isStartable()) {
                        templateComp.setEnabled(false);