Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,10 @@
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",


"env": {
"TEST_DEVWORKSPACE_NAME": "remote-plugin-runner"
}
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
2 changes: 1 addition & 1 deletion src/command/new-environment-variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class NewEnvironmentVariableImpl implements NewEnvironmentVariable {
const environmentVariable = await this.defineEnvironmentVariable();
if (environmentVariable) {
// update Devfile, show a popup with proposal to open the Devfile
await this.saveDevfile.onDidDevfileUpdate(`Environmane '${environmentVariable.name}' has been created successfully`);
await this.saveDevfile.onDidDevfileUpdate(`Environment variable '${environmentVariable.name}' has been created successfully`);
return true;
}

Expand Down
22 changes: 22 additions & 0 deletions src/devfile-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ import { initBindings } from './bindings';
import { InstallYaml } from './command/install-yaml';

export async function activate(context: vscode.ExtensionContext): Promise<void> {
// Due to the bug in the upstream https://github.com/microsoft/vscode/issues/214787 it is not possible to show
// several sequential popups. To prevent popup disappear it needs to add a small delay between two popups.

// Keep the original functions
const _showQuickPick = vscode.window.showQuickPick;
const _showInputBox = vscode.window.showInputBox;

// Replace with functions with a small delay
Object.assign(vscode.window, {
showQuickPick: async (items, options, token) => {
const result = await _showQuickPick(items, options, token);
await new Promise(resolve => setTimeout(resolve, 300));
return result;
},

showInputBox: async (options, token) => {
const result = await _showInputBox(options, token);
await new Promise(resolve => setTimeout(resolve, 300));
return result;
}
});

const container = initBindings();
container.get(DevfileExtensionImpl).start(context);
}
Expand Down