-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide default sync destination if not set (#569)
https://user-images.githubusercontent.com/88345179/225662235-59621b9c-81bd-4ca9-9393-a65b35785838.mov --------- Co-authored-by: Fabian Jakobs <fabian.jakobs@databricks.com>
- Loading branch information
1 parent
646601a
commit 0a641d4
Showing
4 changed files
with
70 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/databricks-vscode/src/vscode-objs/WorkspaceState.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {randomUUID} from "crypto"; | ||
import {ExtensionContext} from "vscode"; | ||
|
||
export class WorkspaceStateManager { | ||
constructor(private context: ExtensionContext) {} | ||
|
||
get skipAutocompleteConfigure() { | ||
return this.context.workspaceState.get( | ||
"databricks.autocompletion.skipConfigure", | ||
false | ||
); | ||
} | ||
|
||
set skipAutocompleteConfigure(value: boolean) { | ||
this.context.workspaceState.update( | ||
"databricks.autocompletion.skipConfigure", | ||
true | ||
); | ||
} | ||
|
||
get fixedUUID() { | ||
let uuid = this.context.workspaceState.get<string>( | ||
"databricks.fixedUUID" | ||
); | ||
if (!uuid) { | ||
uuid = randomUUID(); | ||
this.context.workspaceState.update("databricks.fixedUUID", uuid); | ||
} | ||
return uuid; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters