Skip to content

Commit 37fbf6c

Browse files
authored
expose command to get current workspace path (#2402)
Signed-off-by: Yan Zhang <[email protected]>
1 parent 53d1abe commit 37fbf6c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/commands.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,4 +256,6 @@ export namespace Commands {
256256
export const RUNTIME_VALIDATION_OPEN = 'java.runtimeValidation.open';
257257

258258
export const RESOLVE_WORKSPACE_SYMBOL = 'java.project.resolveWorkspaceSymbol';
259+
260+
export const GET_WORKSPACE_PATH = '_java.workspace.path';
259261
}

src/extension.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ export function activate(context: ExtensionContext): Promise<ExtensionAPI> {
377377

378378
context.subscriptions.push(commands.registerCommand(Commands.CLEAN_WORKSPACE, () => cleanWorkspace(workspacePath)));
379379

380+
context.subscriptions.push(commands.registerCommand(Commands.GET_WORKSPACE_PATH, () => workspacePath));
381+
380382
context.subscriptions.push(onConfigurationChange(workspacePath));
381383

382384
/**

0 commit comments

Comments
 (0)