Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected recreateModel(json: Object): void {
this.dataModel = CommandLineToolFactory.from(json as any, "document");
if (!this.dataModel.namespaces.has("sbg")) {
this.dataModel.namespaces.set("sbg", "https://www.sevenbridges.com/");
}
this.dataModel.onCommandLineResult(cmdResult => {
this.commandLineParts.next(cmdResult);
});
this.dataModel.updateCommandLine();
this.dataModel.setValidationCallback(this.afterModelValidation.bind(this));
this.dataModel.validate().then(this.afterModelValidation.bind(this));
}