Skip to content

Commit 9134e0e

Browse files
Add comment explaining caveats of setSelectedMethod
1 parent 1259a3e commit 9134e0e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

extensions/ql-vscode/src/model-editor/modeling-store.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,13 @@ export class ModelingStore extends DisposableObject {
401401
});
402402
}
403403

404+
/**
405+
* Sets which method is considered to be selected. This method will be shown in the method modeling panel.
406+
*
407+
* The `Method` and `Usage` objects must have been retrieved from the modeling store, and not from
408+
* a webview. This is because we rely on object referential identity so it must be the same object
409+
* that is held internally by the modeling store.
410+
*/
404411
public setSelectedMethod(dbItem: DatabaseItem, method: Method, usage: Usage) {
405412
const dbState = this.getState(dbItem);
406413

0 commit comments

Comments
 (0)