diff --git a/src/web/client/WebExtensionContext.ts b/src/web/client/WebExtensionContext.ts index 6bae00ac..ec8f8ae6 100644 --- a/src/web/client/WebExtensionContext.ts +++ b/src/web/client/WebExtensionContext.ts @@ -366,7 +366,8 @@ class WebExtensionContext implements IWebExtensionContext { odataEtag: string, attributePath: IAttributePath, attributeContent: string, - mappingEntityId?: string + mappingEntityId?: string, + fileUri?: string ) { this.entityDataMap.setEntity( entityId, @@ -374,7 +375,8 @@ class WebExtensionContext implements IWebExtensionContext { odataEtag, attributePath, attributeContent, - mappingEntityId); + mappingEntityId, + fileUri); } public async updateSingleFileUrisInContext(uri: vscode.Uri) { @@ -606,7 +608,7 @@ class WebExtensionContext implements IWebExtensionContext { } /** - * Store a value maintained in Extension context workspaceState. + * Store a value maintained in Extension context workspaceState. * * *Note* that using `undefined` as value removes the key from the underlying * storage. diff --git a/src/web/client/context/entityData.ts b/src/web/client/context/entityData.ts index 1518a637..de1894d5 100644 --- a/src/web/client/context/entityData.ts +++ b/src/web/client/context/entityData.ts @@ -9,6 +9,7 @@ export interface IEntityData extends IEntityInfo { entityEtag: string; entityColumn: Map; mappingEntityId?: string; + filePath?: Set } export class EntityData implements IEntityData { @@ -17,6 +18,7 @@ export class EntityData implements IEntityData { private _entityEtag!: string; private _entityColumn!: Map; private _mappingEntityId?: string; + private _filePath?: Set; public get entityName(): string { return this._entityName; @@ -33,6 +35,9 @@ export class EntityData implements IEntityData { public get mappingEntityId(): string | undefined { return this._mappingEntityId; } + public get filePath(): Set | undefined { + return this._filePath; + } // Setters public set setEntityEtag(value: string) { @@ -44,12 +49,14 @@ export class EntityData implements IEntityData { entityName: string, entityEtag: string, entityColumn: Map, - mappingEntityId?: string + mappingEntityId?: string, + filePath?: Set ) { this._entityId = entityId; this._entityName = entityName; this._entityEtag = entityEtag; this._entityColumn = entityColumn; this._mappingEntityId = mappingEntityId; + this._filePath = filePath; } } diff --git a/src/web/client/context/entityDataMap.ts b/src/web/client/context/entityDataMap.ts index 9c53bb5e..ea570b4b 100644 --- a/src/web/client/context/entityDataMap.ts +++ b/src/web/client/context/entityDataMap.ts @@ -34,7 +34,8 @@ export class EntityDataMap { odataEtag: string, attributePath: IAttributePath, attributeContent: string, - mappingEntityId?: string + mappingEntityId?: string, + fileUri?: string ) { let entityColumnMap = new Map(); const existingEntity = this.entityMap.get(entityId); @@ -44,12 +45,18 @@ export class EntityDataMap { } entityColumnMap.set(attributePath.source, attributeContent); + const filePath = this.entityMap.get(entityId)?.filePath ?? new Set(); + if (fileUri) { + filePath.add(fileUri); + } + const entityData = new EntityData( entityId, entityName, odataEtag, entityColumnMap, - mappingEntityId + mappingEntityId, + filePath ); this.entityMap.set(entityId, entityData); } diff --git a/src/web/client/dal/remoteFetchProvider.ts b/src/web/client/dal/remoteFetchProvider.ts index b7a94db7..e4e2948a 100644 --- a/src/web/client/dal/remoteFetchProvider.ts +++ b/src/web/client/dal/remoteFetchProvider.ts @@ -640,6 +640,7 @@ async function createVirtualFile( odataEtag, attributePath, originalAttributeContent, - mappingEntityId + mappingEntityId, + fileUri, ); }