vscode#FileCreateEvent TypeScript Examples

The following examples show how to use vscode#FileCreateEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: spFileHandlers.ts    From sourcepawn-vscode with MIT License 6 votes vote down vote up
/**
 * Handle the addition of a document by forwarding it to the newDocumentCallback function.
 * @param  {ItemsRepository} itemsRepo      The itemsRepository object constructed in the activation event.
 * @param  {FileCreateEvent} event          The file created event triggered by the creation of the file.
 * @returns void
 */
export function handleAddedDocument(
  itemsRepo: ItemsRepository,
  event: FileCreateEvent
): void {
  event.files.forEach((e) => newDocumentCallback(itemsRepo, e));
}
Example #2
Source File: spItemsRepository.ts    From sourcepawn-vscode with MIT License 5 votes vote down vote up
public handleAddedDocument(event: FileCreateEvent) {
    handleAddedDocument(this, event);
  }