Skip to content

Commit

Permalink
Merge pull request #285 from zowe/EmptyDataset
Browse files Browse the repository at this point in the history
Making sure that the existing models are uniquely identified when opening a file or Dataset
  • Loading branch information
1000TurquoisePogs authored Jul 25, 2022
2 parents feebb9e + 286ce23 commit e0f9878
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions webClient/src/app/editor/code-editor/monaco/monaco.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,12 @@ export class MonacoService implements OnDestroy {
}

generateUri(editorFile: ProjectStructure): string {
// have to use lowercase here!
return `inmemory://${editorFile.name.toLowerCase()}/${editorFile.id}`;
// have to use lowercase here!. This is uniquely identify the Editor Models
if(editorFile.isDataset){
return `inmemory://${editorFile.path.toLowerCase()}`;
} else{
return `inmemory://${editorFile.path.toLowerCase()}/${editorFile.name.toLowerCase()}`;
}
}

fileDuplicateChecker(uri: string): boolean {
Expand Down

0 comments on commit e0f9878

Please sign in to comment.