From f4f094a1c25f481d284beae158f93d4f9a2c6522 Mon Sep 17 00:00:00 2001 From: "jungwook.ryu" Date: Wed, 18 Nov 2015 16:06:06 +0900 Subject: [PATCH] [CheckPoint] : fix bug about Edit chart dialog of CheckPoint page "Edit chart dialog" of CheckPoint page use same data of Timeline page's. so same chart is shown. Change-Id: Ifd4948ae480856cf004786bb036cc8a26a1eae19 Signed-off-by: jungwook.ryu --- .../ui/interactive/chart/InteractiveEditItemsDialog.java | 12 ++++++++++++ .../ui/timeline/common/TimelineEditItemsDialog.java | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/interactive/chart/InteractiveEditItemsDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/interactive/chart/InteractiveEditItemsDialog.java index 6080ea0..dd62370 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/interactive/chart/InteractiveEditItemsDialog.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/interactive/chart/InteractiveEditItemsDialog.java @@ -27,7 +27,9 @@ package org.tizen.dynamicanalyzer.ui.interactive.chart; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.TableItem; @@ -47,6 +49,16 @@ public class InteractiveEditItemsDialog extends TimelineEditItemsDialog { setOkButtonListener(okButtonListener); } + @Override + protected Set getSelectedChartSet() { + Set chartNameList = new HashSet(); + List selectedChartList = InteractiveDataManager.getInstance().getShowTimelineChartList(); + for (int i = 0; i < selectedChartList.size(); i++) { + chartNameList.add(selectedChartList.get(i).getChartName()); + } + return chartNameList; + } + private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() { @Override public void handleClickEvent(DACustomButton button) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineEditItemsDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineEditItemsDialog.java index c18ba63..cf163f7 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineEditItemsDialog.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineEditItemsDialog.java @@ -136,6 +136,10 @@ public class TimelineEditItemsDialog extends DAMessageBox { this.okButtonListener = okButtonListener; } + protected Set getSelectedChartSet() { + return UILayoutDataManager.INSTANCE.getSelectedChartSet(); + } + protected boolean run() { shell.setText(TimelineChartLabels.EDIT_CHART_DLG_TITLE); shell.setBackground(ColorResources.WINDOW_BG_COLOR); @@ -174,7 +178,7 @@ public class TimelineEditItemsDialog extends DAMessageBox { // Column for Title text new TableColumn(chartTableViewer.getTable(), SWT.NONE).setWidth(TEXT_COLUMN_WIDTH); - Set selectedChartSet = UILayoutDataManager.INSTANCE.getSelectedChartSet(); + Set selectedChartSet = getSelectedChartSet(); GC gc = new GC(Display.getCurrent()); gc.setFont(FontResources.EDIT_CHART_DLG_ITEM_SUB_NAME); -- 2.7.4