File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 5959 "gradleContainerView" : [
6060 {
6161 "id" : " gradleTasksView" ,
62- "name" : " Gradle Tasks"
62+ "name" : " Gradle Tasks" ,
63+ "when" : " gradle:activated"
6364 },
6465 {
6566 "id" : " pinnedTasksView" ,
66- "name" : " Pinned Tasks"
67+ "name" : " Pinned Tasks" ,
68+ "when" : " gradle:activated"
6769 },
6870 {
6971 "id" : " recentTasksView" ,
70- "name" : " Recent Tasks"
72+ "name" : " Recent Tasks" ,
73+ "when" : " gradle:activated"
7174 },
7275 {
7376 "id" : " gradleDaemonsView" ,
74- "name" : " Gradle Daemons"
77+ "name" : " Gradle Daemons" ,
78+ "when" : " gradle:activated"
7579 }
7680 ]
7781 },
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ export class Extension {
143143 ) ;
144144 this . api = new Api ( this . client , this . gradleTasksTreeDataProvider ) ;
145145
146+ this . activate ( ) ;
146147 this . storeSubscriptions ( ) ;
147148 this . registerCommands ( ) ;
148149 this . handleTaskEvents ( ) ;
@@ -172,6 +173,12 @@ export class Extension {
172173 ) ;
173174 }
174175
176+ private activate ( ) : void {
177+ // Used for showing the view container in the activity bar
178+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
179+ vscode . commands . executeCommand ( 'setContext' , 'gradle:activated' , true ) ;
180+ }
181+
175182 private registerCommands ( ) : void {
176183 registerCommands ( this . context ) ;
177184 }
You can’t perform that action at this time.
0 commit comments