Skip to content

Commit

Permalink
Bugfixes for REPL integration with workspace folders (finos#86)
Browse files Browse the repository at this point in the history
* Bugfixes for REPL integration with worksapce folders

* Remove debug line
  • Loading branch information
rafaelbey authored Aug 16, 2024
1 parent 487268c commit 8916d2e
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,27 +493,24 @@ class LegendTerminalLink extends TerminalLink {
const REPL_NAME = 'Legend REPL';

export function createReplTerminal(context: ExtensionContext): void {
const planExecutorConfiguration = workspace
.getConfiguration('legend')
.get('planExecutor.configuration', '');
const workspaceFolders =
workspace.workspaceFolders?.map(
(workspaceFolder) => workspaceFolder.uri.fsPath,
) || [];

const shellArgs = [
`-DstoragePath=${path.join(context.storageUri!.fsPath, 'repl')}`,
`-Dlegend.repl.grid.licenseKey=${workspace
.getConfiguration('legend')
.get('agGridLicense', '')}`,
`-Dlegend.planExecutor.configuration=${workspace
.getConfiguration('legend')
.get('planExecutor.configuration', '')}`,
// '-agentlib:jdwp=transport=dt_socket,server=y,quiet=y,suspend=n,address=*:11292',
'org.finos.legend.engine.ide.lsp.server.LegendREPLTerminal',
planExecutorConfiguration,
...workspaceFolders,
];

const workspaceFolders = workspace.workspaceFolders?.map(
(workspaceFolder) => workspaceFolder.name,
);
if (workspaceFolders) {
shellArgs.concat(workspaceFolders);
}

const provider = window.registerTerminalProfileProvider(
'legend.terminal.repl',
{
Expand Down

0 comments on commit 8916d2e

Please sign in to comment.