@@ -7,7 +7,7 @@ import { initialize as initUtils } from "./utils";
77import { initialize as initCommands } from "./commands" ;
88import { initialize as initRecommendations } from "./recommendation" ;
99import { showReleaseNotesOnStart , HelpViewType } from "./misc" ;
10- import { initialize as initExp } from "./exp" ;
10+ import { getExpService , initialize as initExp } from "./exp" ;
1111import { OverviewViewSerializer } from "./overview" ;
1212import { JavaRuntimeViewSerializer , validateJavaRuntime } from "./java-runtime" ;
1313import { scheduleAction } from "./utils/scheduler" ;
@@ -18,7 +18,8 @@ import { ClassPathConfigurationViewSerializer } from "./classpath/classpathConfi
1818import { initFormatterSettingsEditorProvider } from "./formatter-settings" ;
1919import { initRemoteProfileProvider } from "./formatter-settings/RemoteProfileProvider" ;
2020import { CodeActionProvider } from "./providers/CodeActionProvider" ;
21- import { KEY_SHOW_WHEN_USING_JAVA } from "./utils/globalState" ;
21+ import { KEY_IS_WELCOME_PAGE_VIEWED , KEY_SHOW_WHEN_USING_JAVA } from "./utils/globalState" ;
22+ import { TreatmentVariables } from "./exp/TreatmentVariables" ;
2223
2324export async function activate ( context : vscode . ExtensionContext ) {
2425 syncState ( context ) ;
@@ -47,17 +48,17 @@ async function initializeExtension(_operationId: string, context: vscode.Extensi
4748
4849 const config = vscode . workspace . getConfiguration ( "java.help" ) ;
4950
50- if ( config . get ( "firstView" ) !== HelpViewType . None ) {
51- let showWhenUsingJava = context . globalState . get ( KEY_SHOW_WHEN_USING_JAVA ) ;
52- if ( showWhenUsingJava === undefined ) {
53- showWhenUsingJava = vscode . env . uiKind === vscode . UIKind . Desktop ;
54- }
51+ // for control group where walkthrough is not enabled, present first view for once.
52+ const walkthroughEnabled = getExpService ( ) . getTreatmentVariable < boolean > ( TreatmentVariables . VSCodeConfig , TreatmentVariables . JavaWalkthroughEnabled ) ;
53+ if ( walkthroughEnabled === false && ! context . globalState . get ( KEY_IS_WELCOME_PAGE_VIEWED ) ) {
54+ presentFirstView ( context ) ;
55+ context . globalState . update ( KEY_IS_WELCOME_PAGE_VIEWED , true )
56+ }
5557
56- if ( showWhenUsingJava ) {
57- scheduleAction ( "showFirstView" , true ) . then ( ( ) => {
58- presentFirstView ( context ) ;
59- } ) ;
60- }
58+ if ( config . get ( "firstView" ) !== HelpViewType . None && context . globalState . get ( KEY_SHOW_WHEN_USING_JAVA ) ) {
59+ scheduleAction ( "showFirstView" , true ) . then ( ( ) => {
60+ presentFirstView ( context ) ;
61+ } ) ;
6162 }
6263
6364 if ( config . get ( "showReleaseNotes" ) ) {
0 commit comments