Adding External Streaming Job I/O validation (#13195)

* Added Tools Service call for ValidateStreamingJob

* Partial addition of ESJ

* adding test mocks

* Validation working

* Modifying command visibility logic to submatch ESJs in addition to files

* Changed string literal to constant, corrected attribute order

* Added tests

* correcting casing that's causing test failures on linux

* Swapping Thenable for Promise

* excluded validate from command palette
This commit is contained in:
Benjin Dubishar
2020-11-02 19:02:20 -08:00
committed by GitHub
parent ba80000e27
commit 342ff47e51
20 changed files with 198 additions and 37 deletions

View File

@@ -71,6 +71,15 @@ export class FileNode extends BaseProjectTreeItem {
}
}
export class ExternalStreamingJobFileNode extends FileNode {
public get treeItem(): vscode.TreeItem {
const treeItem = super.treeItem;
treeItem.contextValue = DatabaseProjectItemType.externalStreamingJob;
return treeItem;
}
}
/**
* Compares two folder/file tree nodes so that folders come before files, then alphabetically
* @param a a folder or file tree node

View File

@@ -11,7 +11,7 @@ import * as fileTree from './fileFolderTreeItem';
import { Project, EntryType, FileProjectEntry } from '../project';
import * as utils from '../../common/utils';
import { DatabaseReferencesTreeItem } from './databaseReferencesTreeItem';
import { DatabaseProjectItemType, RelativeOuterPath } from '../../common/constants';
import { DatabaseProjectItemType, RelativeOuterPath, ExternalStreamingJob } from '../../common/constants';
import { IconPathHelper } from '../../common/iconHelper';
/**
@@ -76,7 +76,13 @@ export class ProjectRootTreeItem extends BaseProjectTreeItem {
switch (entry.type) {
case EntryType.File:
newNode = new fileTree.FileNode(entry.fsUri, parentNode);
if (entry.sqlObjectType === ExternalStreamingJob) {
newNode = new fileTree.ExternalStreamingJobFileNode(entry.fsUri, parentNode);
}
else {
newNode = new fileTree.FileNode(entry.fsUri, parentNode);
}
break;
case EntryType.Folder:
newNode = new fileTree.FolderNode(entry.fsUri, parentNode);