Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function activate(context: ExtensionContext) {
let extensionInfo = new ExtensionInfo();
// initialize the instrumentation wrapper
await initialize(extensionInfo.getId(), extensionInfo.getVersion(), KEY);
try {
// activate the extension, but send instrumentation data
await instrumentOperation("activation", activateWithTelemetry)(context);
}
catch (ex) {
// sadly, the next line never gets triggered, even if the activateWithTelemetry fails
window.showErrorMessage("There was an error starting the PDDL extension: " + ex.message);
}
}
async requestLeanpkgConfigure(message: string) {
const configureItem = 'Run leanpkg configure.';
const chosen = await window.showErrorMessage(message, configureItem);
if (chosen === configureItem) {
await this.configure();
}
}
.catch(err => {
const message =
"Unable to find a Java 8 or Java 11 installation on this computer. " +
"To fix this problem, update the 'Java Home' setting to point to a Java 8 or Java 11 home directory";
outputChannel.appendLine(message);
outputChannel.appendLine(err);
window.showErrorMessage(message, openSettingsAction).then(choice => {
if (choice === openSettingsAction) {
commands.executeCommand("workbench.action.openSettings");
}
});
});
commands.executeCommand("setContext", "metals:enabled", true);
}).catch((erro: string) => {
window.showErrorMessage(erro);
mergeAdvpl.repository.checkout(branchAtual);
validaProjeto();
});
})