Network:display full network address on the network chartboard 90/40390/4
authorhyeran74.kim <hyeran74.kim@samsung.com>
Wed, 3 Jun 2015 09:11:06 +0000 (18:11 +0900)
committerwoojin jung <woojin2.jung@samsung.com>
Wed, 10 Jun 2015 11:01:13 +0000 (04:01 -0700)
Change-Id: I6218c133c6f324b5cb2f9a98466ce72312df99bc
Signed-off-by: hyeran74.kim <hyeran74.kim@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkChartBoard.java

index 8bfbba0..5273064 100644 (file)
@@ -52,6 +52,8 @@ import org.tizen.dynamicanalyzer.ui.network.data.type.NetworkSelectionType;
 import org.tizen.dynamicanalyzer.ui.network.data.type.NetworkSeriesType;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
 import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
+import org.tizen.dynamicanalyzer.ui.toolbar.setting.data.SettingConstants;
+import org.tizen.dynamicanalyzer.util.Logger;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChart;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlot;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlot.AutoRangeType;
@@ -305,11 +307,23 @@ public class NetworkChartBoard extends DAChartBoard {
        private void addParentChartItemList(String destinationAddress, String fd) {
                parentChartIndex++;
                lastChildChartIndexOfEachParent.put(parentChartIndex, 1);
-               StringBuffer chartName = new StringBuffer(destinationAddress);
-               if (chartName.length() > 10) {
-                       chartName.replace(10, chartName.length(), CommonConstants.EMPTY);
-                       chartName.insert(chartName.length(), "...");//$NON-NLS-1$
+               
+               String addr[] = destinationAddress.split(":");
+               StringBuffer chartName = new StringBuffer();
+               if (addr.length > 1) {
+                       chartName.append(addr[0]);
+                       chartName.append("\n:");//$NON-NLS-1$
+                       chartName.append(addr[addr.length-1]);
+                       chartName.append("\n");//$NON-NLS-1$
+               }else{
+                       chartName = new StringBuffer(destinationAddress);
+                       if (chartName.length() > 10) {
+                               chartName.replace(10, chartName.length(), CommonConstants.EMPTY);
+                               chartName.insert(chartName.length(), "...");//$NON-NLS-1$
+                       }
+                       Logger.warning("Destination port number does not exist");
                }
+               
                DAChartBoardItem parentItem = new DAChartBoardItem(this, chartName.toString());
                parentItem.setData(new NetworkSelectionType(destinationAddress, fd, true));
                DAChart parentDAChart = parentItem.getChart();