Make new blaze console experiment a feature rollout experiment
package com.google.idea.blaze.base.console;
import com.google.common.primitives.Ints;
-import com.google.idea.common.experiments.BoolExperiment;
+import com.google.idea.common.experiments.FeatureRolloutExperiment;
import com.google.idea.common.experiments.IntExperiment;
import com.google.idea.common.util.MorePlatformUtils;
@@ -27,15 +27,15 @@ import com.google.idea.common.util.MorePlatformUtils;
*/
public final class BlazeConsoleExperimentManager {
- // The values of experiments are being read once on startup. This because dynamic switching
- // between v1 and v2 consoles is not supported.
- private static final boolean V1_ENABLED = new BoolExperiment("blazeconsole.v1", true).getValue();
- private static final boolean V2_ENABLED = new BoolExperiment("blazeconsole.v2", false).getValue();
+ // The experiment is read once on startup, as the tool window is only created
+ // once during the lifetime of the IDE
+ private static final boolean V2_ENABLED =
+ new FeatureRolloutExperiment("blazeconsole.v2.rollout").isEnabled();
private BlazeConsoleExperimentManager() {}
public static boolean isBlazeConsoleV1Enabled() {
- return V1_ENABLED || !V2_ENABLED;
+ return !V2_ENABLED;
}
public static boolean isBlazeConsoleV2Enabled() {
