From: p.privalov
Date: Mon, 1 Aug 2016 11:08:10 +0000 (+0300)
Subject: SRADA-982 SelectedFlatFeatures cleared by CliInternals.selectFeatures().
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdf116ad6c3c8bd7eb6128e75f1840c4400b9e6d;p=sdk%2Ftools%2Fdynamic-analyzer.git
SRADA-982 SelectedFlatFeatures cleared by CliInternals.selectFeatures().
Implemented setSelectedFlatFeatures(Set) in TargetData.
Change-Id: I4463cdf613b8c85fd6f4a3d8c749b69bce5cb8d3
---
diff --git a/org.tizen.dynamicanalyzer.cli/src/org/tizen/dynamicanalyzer/cli/CliInternals.java b/org.tizen.dynamicanalyzer.cli/src/org/tizen/dynamicanalyzer/cli/CliInternals.java
index 46aac74..6d57471 100644
--- a/org.tizen.dynamicanalyzer.cli/src/org/tizen/dynamicanalyzer/cli/CliInternals.java
+++ b/org.tizen.dynamicanalyzer.cli/src/org/tizen/dynamicanalyzer/cli/CliInternals.java
@@ -31,6 +31,7 @@ import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
import org.tizen.dynamicanalyzer.nl.TimelineChartLabels;
import org.tizen.dynamicanalyzer.project.AppInfo;
import org.tizen.dynamicanalyzer.project.PackageInfo;
+import org.tizen.dynamicanalyzer.setting.FlatFeature;
import org.tizen.dynamicanalyzer.setting.FlatPreferences;
import org.tizen.dynamicanalyzer.setting.PrimitiveFeature;
import org.tizen.dynamicanalyzer.setting.SettingDataManager;
@@ -275,13 +276,13 @@ public final class CliInternals {
private static boolean selectFeatures(TracingArguments args) {
// drop previous settings
UILayoutDataManager.INSTANCE.setSelectedChartSet(new HashSet());
+ TargetData target = SettingDataManager.INSTANCE.getTarget(null);
+ target.setSelectedFlatFeatures(new HashSet());
selectScreenshotFeature(args.getScreenshotPeriod(),
args.isScreenshotPeriodSpecified());
args.getFeatures().remove(PrimitiveFeature.SCREENSHOT);//This feature added to target by selectScreenshotFeature().
- TargetData target = SettingDataManager.INSTANCE.getTarget(null);
-
for (PrimitiveFeature feature : args.getFeatures()) {
target.addSelectedFlatFeature(feature.getName());
UILayoutDataManager.INSTANCE.addSelectedChart(feature.getChart());
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/TargetData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/TargetData.java
index 6558896..a44ba13 100644
--- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/TargetData.java
+++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/setting/TargetData.java
@@ -30,6 +30,7 @@ import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Set;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.protocol.Protocol;
@@ -466,4 +467,9 @@ public class TargetData {
dest.add(source.get(i));
}
}
+
+ public void setSelectedFlatFeatures(Set set) {
+ selectedFlatFeatureList.clear();
+ selectedFlatFeatureList.addAll(set);
+ }
}