[SRADA-177] Add license message and remove unused import
authordongkyu6 lee <dongkyu6.lee@samsung.com>
Thu, 24 Mar 2016 07:56:22 +0000 (16:56 +0900)
committerdongkyu6 lee <dongkyu6.lee@samsung.com>
Thu, 24 Mar 2016 07:56:22 +0000 (16:56 +0900)
Change-Id: I7614ae4b0cf0726dd8721cea919d34a94818ee4d
Signed-off-by: dongkyu6 lee <dongkyu6.lee@samsung.com>
19 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryAllocationTraceTableView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryCallStackView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryChartView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryDetailsTableView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryMapView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/HeapMemoryChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChartBoard.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/ProcessMemoryChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/SystemMemoryChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/AllocateCallStackDBTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/MemoryDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryCallStackTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryDetailsTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryMapTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryStatisticsTable.java

index bfcfa96..dc11ad4 100755 (executable)
@@ -40,6 +40,10 @@ public class MemoryPageLabels extends NLS {
        public static String MEMORY_CHART_PROCESS_MEMORY;
        public static String MEMORY_CHART_SYSTEM_MEMORY;
        
+       public static String MEMORY_MEMORYMAP_LIBNAME;
+       public static String MEMORY_MEMORYMAP_ADDRESS;
+       public static String MEMORY_MEMORYMAP_ADDRESS_LOW;
+       public static String MEMORY_MEMORYMAP_ADDRESS_HIGH;
        
        static {
                // initialize resource bundle
index f8abc77..8d04090 100755 (executable)
@@ -29,6 +29,11 @@ MEMORY_ALLOCATION_TRACE_VIEW_SIZE=Size
 MEMORY_ALLOCATION_TRACE_VIEW_LIBRARY=Library\r
 MEMORY_ALLOCATION_TRACE_VIEW_CALLER_FUNCTION=Caller Function\r
 \r
+MEMORY_MEMORYMAP_LIBNAME=Name\r
+MEMORY_MEMORYMAP_ADDRESS=Address\r
+MEMORY_MEMORYMAP_ADDRESS_LOW=Low\r
+MEMORY_MEMORYMAP_ADDRESS_HIGH=High\r
+\r
 MEMORY_CHART_HEAP_MEMORY=Heap allocation\r
 MEMORY_CHART_PROCESS_MEMORY=Process Size\r
 MEMORY_CHART_SYSTEM_MEMORY=Memory
\ No newline at end of file
index aa2cc78..f5e6b0a 100755 (executable)
@@ -1,3 +1,27 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
+
 package org.tizen.dynamicanalyzer.ui.memory;
 
 import org.eclipse.swt.SWT;
index f98c218..c722b14 100644 (file)
@@ -1,8 +1,29 @@
-package org.tizen.dynamicanalyzer.ui.memory;
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
 
-import java.util.List;
+package org.tizen.dynamicanalyzer.ui.memory;
 
-import org.eclipse.nebula.widgets.grid.Grid;
 import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.FillLayout;
@@ -13,19 +34,11 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Text;
-import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
-import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
 import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.swap.model.data.LogData;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DAWindowingTableComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
 
index fb90991..43b0389 100755 (executable)
@@ -1,3 +1,27 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
+
 package org.tizen.dynamicanalyzer.ui.memory;
 
 import org.eclipse.swt.custom.StackLayout;
@@ -12,11 +36,9 @@ import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.swap.model.data.LogData;
 import org.tizen.dynamicanalyzer.ui.common.SetRangeMarkerMouseMoveListener;
 import org.tizen.dynamicanalyzer.ui.common.UICommonConstants;
 import org.tizen.dynamicanalyzer.ui.memory.chart.MemoryChartBoard;
-import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager;
 import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
 import org.tizen.dynamicanalyzer.ui.timeline.logparser.LifecycleLogParser;
@@ -142,9 +164,6 @@ public class MemoryChartView extends DAViewComposite {
        @Override
        public void updateView(DAViewData data) {
                memoryChartBoard.updateChart();
-               if (data instanceof DASelectionData == false) {
-                       return;
-               }
        }
        
        @Override
index 543cb99..cceedf2 100755 (executable)
@@ -1,3 +1,27 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
+
 package org.tizen.dynamicanalyzer.ui.memory;
 
 import org.eclipse.swt.SWT;
index a2d256f..d42ac5a 100755 (executable)
@@ -1,72 +1,67 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
+
 package org.tizen.dynamicanalyzer.ui.memory;
 
-import org.eclipse.nebula.widgets.grid.GridItem;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.DASelectionData;
-import org.tizen.dynamicanalyzer.constant.CommonConstants;
 import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
-import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.ui.network.data.type.NetworkAPIType;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
+import org.tizen.dynamicanalyzer.ui.memory.table.MemoryMapTable;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
 
 public class MemoryMapView extends DAViewComposite {
-       private Composite contents = null;
-       private Text detailText = null;
-       private Label labelMessage = null;
        
-       private void init() {
-               detailText.setText(CommonConstants.EMPTY);
-       }
+       public static final String ID = MemoryDetailsTableView.class.getName();
+       
+       MemoryMapTable tableComp = null;
 
-       public MemoryMapView(Composite parent, int style) {
+       public MemoryMapView(Composite parent, int style) {             
                super(parent, style, true);
                this.setLayout(new FillLayout());
-               
                setTitle(MemoryPageLabels.MEMORY_MAP_VIEW_TITLE);
-               
-               Composite detailCom = getContentArea();
-               detailCom.setBackground(ColorResources.VIEW_BG_COLOR);
-               detailCom.setLayout(new FormLayout());
-               FormData labelData = new FormData();
-               labelData.top = new FormAttachment(0, 0);
-               labelData.left = new FormAttachment(0, 0);
-               labelData.right = new FormAttachment(100, 0);
-               labelData.bottom = new FormAttachment(100, 0);
-               detailCom.setLayoutData(labelData);
-               
-               Composite contents = detailCom;
-               contents.setBackground(ColorResources.VIEW_BG_COLOR);
-               contents.setLayout(new FormLayout());
-               
-               detailText = new Text(contents, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
-               detailText.setBackground(ColorResources.VIEW_BG_COLOR);
-               detailText.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR);
-               detailText.setFont(FontResources.DETAIL_INFO_FONT);
-               
-               FormData buttonData = new FormData();
-               buttonData.top = new FormAttachment(labelMessage, 0);
-               buttonData.left = new FormAttachment(0, 0);
-               buttonData.right = new FormAttachment(100, 0);
-               buttonData.bottom = new FormAttachment(100, 0);
-               detailText.setLayoutData(buttonData);
-               detailText.getVerticalBar().setVisible(true);
-               detailText.getHorizontalBar().setVisible(true);
+               Composite contents = getContentArea();
+               contents.setBackground(ColorResources.WINDOW_BG_COLOR);
+               contents.setLayout(new FillLayout());
+               tableComp = new MemoryMapTable(contents, SWT.NONE, SWT.MULTI | SWT.BORDER 
+                               | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
        }
        
        @Override
        public void updateView() {
-               
+               if (!AnalyzerManager.isVisibleView(this.getID())) {
+                       return;
+               }
+               if (null == tableComp) {
+                       return;
+               }
+               tableComp.updateTable();
        }
        
        @Override
@@ -75,20 +70,15 @@ public class MemoryMapView extends DAViewComposite {
                        return;
                }
                DASelectionData seldata = (DASelectionData) data;
-               if (seldata.getData() instanceof GridItem[]) {
-                       
-               } else {
-                       
-               }
        }
        
        @Override
-       public Control getControl() {
-               return contents;
+       public void clear() {
+               tableComp.clear();
        }
 
        @Override
-       public void clear() {
-               init();
+       public Control getControl() {
+               return tableComp;
        }
 }
index 5c0b98d..a66c93b 100755 (executable)
@@ -1,3 +1,27 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
+
 package org.tizen.dynamicanalyzer.ui.memory;
 
 import org.eclipse.swt.SWT;
index 6e718e8..b44ecbe 100755 (executable)
@@ -1,3 +1,27 @@
+/*\r
+ *  Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
 package org.tizen.dynamicanalyzer.ui.memory.chart;\r
 \r
 import java.util.ArrayList;\r
index ce700e9..cd6e10b 100755 (executable)
@@ -1,3 +1,27 @@
+/*\r
+ *  Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
 package org.tizen.dynamicanalyzer.ui.memory.chart;\r
 \r
 import java.util.List;\r
index 4c750ce..29bd4b5 100755 (executable)
@@ -1,3 +1,27 @@
+/*\r
+ *  Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
 package org.tizen.dynamicanalyzer.ui.memory.chart;\r
 \r
 import java.util.ArrayList;\r
index d801985..123e279 100755 (executable)
@@ -1,3 +1,27 @@
+/*\r
+ *  Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
 package org.tizen.dynamicanalyzer.ui.memory.chart;\r
 \r
 import java.util.ArrayList;\r
index addb08b..665755c 100755 (executable)
@@ -1,3 +1,27 @@
+/*\r
+ *  Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
 package org.tizen.dynamicanalyzer.ui.memory.chart;\r
 \r
 import java.util.ArrayList;\r
index 2cbcfdb..d8b7124 100644 (file)
@@ -1,3 +1,27 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
+
 package org.tizen.dynamicanalyzer.ui.memory.data;
 
 import java.sql.PreparedStatement;
index ba4e369..a767b8a 100755 (executable)
@@ -29,7 +29,6 @@ import java.sql.SQLException;
 import java.util.ArrayList;\r
 import java.util.HashMap;\r
 import java.util.Iterator;\r
-import java.util.LinkedHashMap;\r
 import java.util.List;\r
 import java.util.Map;\r
 \r
@@ -39,6 +38,7 @@ import org.tizen.dynamicanalyzer.database.DBInserter;
 import org.tizen.dynamicanalyzer.database.SqlConnectionManager;\r
 import org.tizen.dynamicanalyzer.project.BinaryInfo;\r
 import org.tizen.dynamicanalyzer.project.LibraryObject;\r
+import org.tizen.dynamicanalyzer.project.ProcessInformation;\r
 import org.tizen.dynamicanalyzer.project.ProcessMemoryMap;\r
 import org.tizen.dynamicanalyzer.project.Project;\r
 import org.tizen.dynamicanalyzer.protocol.ProtocolConstants;\r
@@ -47,16 +47,14 @@ import org.tizen.dynamicanalyzer.swap.logparser.Logs;
 import org.tizen.dynamicanalyzer.swap.logparser.PageDataManager;\r
 import org.tizen.dynamicanalyzer.swap.model.data.LogData;\r
 import org.tizen.dynamicanalyzer.swap.model.data.MemoryData;\r
+import org.tizen.dynamicanalyzer.swap.model.data.MemoryMapData;\r
 import org.tizen.dynamicanalyzer.swap.model.data.ProcessProfileData;\r
 import org.tizen.dynamicanalyzer.swap.model.data.SystemData;\r
 import org.tizen.dynamicanalyzer.util.Logger;\r
-import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoard;\r
 \r
 public class MemoryDataManager extends PageDataManager {\r
        private static MemoryDataManager instance = new MemoryDataManager();\r
        \r
-       private DAChartBoard chartBoard = null;\r
-       \r
        private static final int MEM_API_TYPE_ALLOC = 0;\r
        private static final int MEM_API_TYPE_FREE = 1;\r
        private static final int MEM_USER = 2;\r
@@ -83,9 +81,6 @@ public class MemoryDataManager extends PageDataManager {
        private DBInserter allocateDBInserter = null;\r
        private DBInserter freeDBInserter = null;\r
        private DBInserter allocateCallStackDBInserter = null;\r
-       \r
-       private LinkedHashMap<Long, Integer> parentChartIndexOfSeq = new LinkedHashMap<Long, Integer>();\r
-       private LinkedHashMap<Long, Integer> childChartIndexOfSeq = new LinkedHashMap<Long, Integer>();\r
 \r
        public static MemoryDataManager getInstance() {\r
                return instance;\r
@@ -104,17 +99,11 @@ public class MemoryDataManager extends PageDataManager {
                freeDBInserter = makeInserter(freeDBTable);\r
                //allocateCallStackDBInserter = makeInserter(allocateCallStackDBTable); \r
        }\r
-\r
-       public void setChartMemoryChartBoard(DAChartBoard board) {\r
-               chartBoard = board;\r
-       }\r
        \r
        public void clear() {\r
                allocByteMap = new HashMap<Integer, Long>();\r
                libraryAllocByteMap = new HashMap<Integer, Map<Integer, Long>>();\r
                allocationSeriesDataSetMap = new HashMap<Long, Long>();\r
-               parentChartIndexOfSeq = new LinkedHashMap<Long, Integer>();\r
-               childChartIndexOfSeq = new LinkedHashMap<Long, Integer>();\r
 \r
                memoryAllocDataList.clear();\r
                memoryfreeDataList.clear();\r
@@ -133,6 +122,9 @@ public class MemoryDataManager extends PageDataManager {
                Logs systemmemorylogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_DATA_SYSTEM);\r
                Logs allocatedlogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROBE_MEMORY);\r
 \r
+               //Logs memorymaplogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROCESS_MAP);\r
+               //Logs memoryunmaplogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROCESS_UNMAP);\r
+\r
                makeSystemMemoryData(systemmemorylogs, allocatedlogs);\r
        }\r
 \r
@@ -456,7 +448,7 @@ public class MemoryDataManager extends PageDataManager {
        \r
        public List<List<Object>> makeLeakDataForRange(long startTime, long endTime, int targetPID) {\r
                List<List<Object>> rangeDataList = new ArrayList<List<Object>> ();\r
-               \r
+\r
                if (targetPID != 0) {\r
                                List<List<Object>> allocDataList = getAllocationDataFromDB(startTime, endTime, targetPID);\r
                                List<List<Object>> freeDataList = getFreeDataFromDB(startTime, endTime, targetPID);\r
@@ -519,39 +511,6 @@ public class MemoryDataManager extends PageDataManager {
                return allocData;\r
        }\r
 \r
-       public int getParentIndexOfSeq(long seq) {\r
-               Integer chartIndex = this.parentChartIndexOfSeq.get(seq);\r
-               if (null != chartIndex) {\r
-                       return chartIndex;\r
-               } else {\r
-                       return 0;\r
-               }\r
-       }\r
-\r
-       public void setParentIndexOfSeq(long seq, int paretnChartIndex) {\r
-               Integer chartIndex = this.parentChartIndexOfSeq.get(seq);\r
-               if (null == chartIndex) {\r
-                       this.parentChartIndexOfSeq.put(seq, paretnChartIndex);\r
-               }\r
-\r
-       }\r
-\r
-       public int getChildIndexOfSeq(long seq) {\r
-               Integer chartIndex = this.childChartIndexOfSeq.get(seq);\r
-               if (null != chartIndex) {\r
-                       return chartIndex;\r
-               } else {\r
-                       return 0;\r
-               }\r
-       }\r
-\r
-       public void setChildIndexOfSeq(long seq, int childChartIndex) {\r
-               Integer chartIndex = this.childChartIndexOfSeq.get(seq);\r
-               if (null == chartIndex) {\r
-                       this.childChartIndexOfSeq.put(seq, childChartIndex);\r
-               }\r
-       }\r
-\r
        private void GetAllocationData(List<LogData> memoryLogList) {\r
                int size = memoryLogList.size();\r
                for (int i = 0; i < size; i++) {\r
@@ -585,6 +544,9 @@ public class MemoryDataManager extends PageDataManager {
                                }\r
                        }\r
 \r
+                       /*\r
+                        * Save allocation and free api call \r
+                        */\r
                        if(MEM_API_TYPE_ALLOC == memApiType) {\r
                                makeAllocData(logData);\r
                        }\r
@@ -699,4 +661,5 @@ public class MemoryDataManager extends PageDataManager {
                systemMemoryDBInserter.pushData(systemDataList);\r
                processMemoryDBInserter.pushData(targetProcessDataList);\r
        }\r
+\r
 }\r
index b6b057a..15b3163 100644 (file)
@@ -1,3 +1,27 @@
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
+
 package org.tizen.dynamicanalyzer.ui.memory.table;
 
 import java.util.List;
index c6d73d3..78178fc 100755 (executable)
@@ -31,8 +31,6 @@ import java.util.Map;
 \r
 import org.eclipse.nebula.widgets.grid.GridItem;\r
 import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.MouseEvent;\r
-import org.eclipse.swt.events.MouseListener;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.eclipse.swt.widgets.Event;\r
 import org.eclipse.swt.widgets.Listener;\r
@@ -118,34 +116,6 @@ public class MemoryDetailsTable extends DATreeComposite {
                                setExpand(item, false);\r
                        }\r
                });\r
-               \r
-               table.addMouseListener(new MouseListener() {\r
-\r
-                       @Override\r
-                       public void mouseUp(MouseEvent e) {\r
-                               // do nothing\r
-                       }\r
-\r
-                       @Override\r
-                       public void mouseDown(MouseEvent e) {\r
-                               // do nothing\r
-                       }\r
-\r
-                       @Override\r
-                       public void mouseDoubleClick(MouseEvent e) {\r
-                               GridItem[] items = (GridItem[]) table.getSelection();\r
-                               if (null == items || items.length == 0) {\r
-                                       return;\r
-                               }\r
-                               GridItem item = items[0];\r
-                               if (item.isExpanded()) {\r
-                                       setExpand(item, false);\r
-                               } else {\r
-                                       setExpand(item, true);\r
-                               }\r
-                               updateTree();\r
-                       }\r
-               });\r
        }\r
        \r
        public void setSelectionRange(Long start, Long end) {\r
index 3b28968..2006562 100644 (file)
+/*
+ *  Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@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.
+ * 
+ */
+
 package org.tizen.dynamicanalyzer.ui.memory.table;
 
+import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.nebula.widgets.grid.GridColumn;
+import org.eclipse.nebula.widgets.grid.GridColumnGroup;
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.Global;
+import org.tizen.dynamicanalyzer.model.ColumnData;
 import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
+import org.tizen.dynamicanalyzer.project.ProcessMemoryMap;
+import org.tizen.dynamicanalyzer.project.Project;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.ColumnGroupRenderer;
+import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableCellRenderer;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;
+import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;
 
 public class MemoryMapTable extends DATableComposite {
+       
+       private int[] columnSizes = { 100, 0, 0, 90};
+       private boolean[] columnVisibility = { true, true, true, true };
+       private int[] columnAlignment = { SWT.CENTER, SWT.LEFT, SWT.LEFT, SWT.LEFT };
+       
+       private int keyindex = 0;
+       
+       private String[] columnNames = { 
+                       MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS,
+                       MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_LOW,
+                       MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_HIGH,
+                       MemoryPageLabels.MEMORY_MEMORYMAP_LIBNAME
+       };
+       
+       int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE, AnalyzerConstants.SORT_TYPE_NONE,
+                       AnalyzerConstants.SORT_TYPE_NONE, AnalyzerConstants.SORT_TYPE_NONE
+       };
 
        public MemoryMapTable(Composite parent, int style, int tableStyle) {
                super(parent, style, tableStyle);
-               // TODO Auto-generated method stub
+               
+               setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
+
+               setTableName(MemoryPageLabels.MEMORY_MAP_VIEW_TITLE);
+               setComparator(new DefaultTableComparator());
+               
+               setSortTypes(sortTypes);
+               setColumnAlignment(columnAlignment);
+               List<ColumnData> columnData = createColumnData();
+               setColumns(columnData);         
+               setColumnSize(columnSizes);
+               setColumnVisibility(columnVisibility);
+               
+               setTableToolTipEnable(false);
+               
+               comparator.setType(AnalyzerConstants.SORT_TYPE_NONE);
+               comparator.setColumn(0);
+               
+               parent.addControlListener(new TableColumnSizePackListener(this, columnSizes));
        }
        
        @Override
        protected List<TableInput> makeTableInput() {
-               // TODO Auto-generated method stub
-               return null;
+               List<TableInput> output = new ArrayList<TableInput>();
+               List<Integer> pidlist = new ArrayList<Integer>();
+
+               if(Global.getProject() == null) {
+                       return output;
+               }
+
+               int[] pids = Global.getProject().getProcessIDs();
+               int targetPID = Toolbar.INSTANCE.getSelectedPid();
+
+               if(targetPID > 0) {
+                       pidlist.add(targetPID);
+               }
+               else {
+                       for (int i = 0; i < pids.length; i++) {
+                               pidlist.add(pids[i]);
+                       }       
+               }
+               
+               Project project = Global.getProject();
+
+               for(int i = 0 ; i < pidlist.size() ; i++) {
+                       
+                       ProcessMemoryMap pmap = project.getProcessInformation(pidlist.get(i)).getLastProcessMemoryMap();                        
+               }
+
+               return output;
+       }
+       
+       private List<ColumnData> createColumnData() {
+               List<ColumnData> columnData = new ArrayList<ColumnData>();
+
+               ColumnData data1 = new ColumnData(MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS);
+               ColumnData data1Child1 = new ColumnData(MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_LOW);
+               ColumnData data1Child2 = new ColumnData(MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_HIGH);
+               data1.getChildren().add(data1Child1);
+               data1.getChildren().add(data1Child2);
+               columnData.add(data1);
+
+               ColumnData data2 = new ColumnData(MemoryPageLabels.MEMORY_MEMORYMAP_LIBNAME);
+               columnData.add(data2);
+               
+               return columnData;
+       }
+       
+       public void setColumns(List<ColumnData> columnData) {
+               int size = columnData.size();
+               int index = 0;
+               for (int i = 0; i < size; i++) {
+                       if (columnData.get(i).isParent()) {
+                               GridColumnGroup columnGroup = new GridColumnGroup(table,
+                                               SWT.NONE);
+                               columnGroup.setHeaderRenderer(new ColumnGroupRenderer());
+                               columnGroup.setText(columnData.get(i).getText());
+                               List<ColumnData> children = columnData.get(i).getChildren();
+                               int childSize = children.size();
+                               for (int ii = 0; ii < childSize; ii++) {
+                                       createColumn(columnGroup, children.get(ii), index++);
+                               }
+                       } else {
+                               createColumn(table, columnData.get(i), index++);
+                       }
+               }
+       }
+       
+       private void createColumn(Object parent, ColumnData data, int index) {
+               GridColumn column = null;
+               if (parent instanceof GridColumnGroup) {
+                       GridColumnGroup group = (GridColumnGroup) parent;
+                       column = new GridColumn(group, SWT.NONE);
+               } else {
+                       Grid table = (Grid) parent;
+                       column = new GridColumn(table, SWT.NONE);
+               }
+
+               column.setCellRenderer(new DATableCellRenderer());
+               column.setHeaderRenderer(new DATableHeaderRenderer());
+               column.setText(data.getText());
+               if (columnAlignment != null) {
+                       if (columnAlignment.length > index) {
+                               column.setAlignment(columnAlignment[index]);
+                       }
+               }
+               if (data.getWidth() == 0) {
+                       column.pack();
+               } else {
+                       column.setWidth(data.getWidth());
+               }
        }
 
 }
index 94c36c5..0da138d 100755 (executable)
@@ -29,19 +29,13 @@ import java.util.HashMap;
 import java.util.List;\r
 import java.util.Map;\r
 \r
-import org.eclipse.nebula.widgets.grid.GridItem;\r
 import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.SelectionEvent;\r
-import org.eclipse.swt.events.SelectionListener;\r
 import org.eclipse.swt.widgets.Composite;\r
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;\r
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;\r
-import org.tizen.dynamicanalyzer.common.DASelectionData;\r
 import org.tizen.dynamicanalyzer.common.Global;\r
 import org.tizen.dynamicanalyzer.model.TableInput;\r
 import org.tizen.dynamicanalyzer.model.TreeInput;\r
 import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;\r
-import org.tizen.dynamicanalyzer.ui.memory.MemoryStatisticsTableView;\r
 import org.tizen.dynamicanalyzer.ui.memory.data.AllocateDBTable;\r
 import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager;\r
 import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;\r