From: ggh1933.go Date: Tue, 28 Jun 2016 06:20:50 +0000 (+0900) Subject: [SRADA-850]FIX : when new trace, report menu items reset. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f804222377949f1fea741c4d9f3fdda4963f7cc;p=sdk%2Ftools%2Fdynamic-analyzer.git [SRADA-850]FIX : when new trace, report menu items reset. - + when feature setting OK, ReportMenu items reset. Change-Id: Ia1b7b1cf847937cbb71306c31a31e244f2a29582 --- diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/SettingDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/SettingDataManager.java index bdf3a6d..9f2606f 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/SettingDataManager.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/SettingDataManager.java @@ -80,7 +80,8 @@ public enum SettingDataManager { private Map targetListMap = new LinkedHashMap(); private boolean isPlatformDA = false; - + private boolean isNewSetting = false; + private SettingDataManager() { // set SettingFilePath if (null == SettingConstants.SettingFilePath) { @@ -836,6 +837,8 @@ public enum SettingDataManager { // update setting data updateSettingData(); + + setNewSetting(true); } private void updateSettingData() { @@ -858,6 +861,8 @@ public enum SettingDataManager { TargetData target = entry.getValue(); target.revertSettingData(); } + + setNewSetting(false); } public void writeAvailableChartList(String targetName, List availableChartList) { @@ -950,4 +955,12 @@ public enum SettingDataManager { return null; } + public boolean isNewSetting() { + return isNewSetting; + } + + public void setNewSetting(boolean isNewSetting) { + this.isNewSetting = isNewSetting; + } + } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/MenuBar.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/MenuBar.java index 305353e..de1f963 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/MenuBar.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/MenuBar.java @@ -253,9 +253,16 @@ public class MenuBar { // change UI state Toolbar.INSTANCE.changeUIState(DAState.INIT); Toolbar.INSTANCE.setScaleSelection(DAScale.DEFAULT_SCALE_INDEX); - + FlatFeatureDialog featureDialog = new FlatFeatureDialog(currentShell); featureDialog.open(); + + /// if Feature Select changed and OK, is NewSetting is true. + if(SettingDataManager.INSTANCE.isNewSetting()){ + // reset checks on ReportMenu items + resetReportItemCheck(); + } + } else if (menuName.equals(MenuBarLabels.FILE_LOAD)) { FileDialog dialog = new FileDialog(currentShell, SWT.OPEN); dialog.setFilterNames(new String[] { "Zip file" }); @@ -702,4 +709,27 @@ public class MenuBar { public boolean getSourceView() { return this.sourceView; } + + public boolean resetReportItemCheck() { + + + // reset check on Report MENU + for (int i = 0; i < menubar.getItems().length; i++) { + MenuItem menuitem = menubar.getItem(i); + if (menuitem.getText().equals("View")) { + for(int ii = 0; ii < menuitem.getMenu().getItems().length ; ii++){ + if(menuitem.getMenu().getItem(ii).getText().contains("Report")){ + MenuItem submenu = menuitem.getMenu().getItem(ii); + submenu.getMenu().getItem(0).setSelection(false); + submenu.getMenu().getItem(1).setSelection(false); + submenu.getMenu().getItem(2).setSelection(false); + + return true; + } + } + } + } + + return false; + } } \ No newline at end of file