-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into andrueastman/multipartRequests
- Loading branch information
Showing
7 changed files
with
144 additions
and
26 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
vscode/microsoft-kiota/src/commands/open-api-tree-view/addAllToSelectedEndpointsCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { treeViewId } from "../../constants"; | ||
import { OpenApiTreeNode, OpenApiTreeProvider } from "../../openApiTreeProvider"; | ||
import { Command } from "../Command"; | ||
|
||
export class AddAllToSelectedEndpointsCommand extends Command { | ||
private _openApiTreeProvider: OpenApiTreeProvider; | ||
|
||
constructor(openApiTreeProvider: OpenApiTreeProvider) { | ||
super(); | ||
this._openApiTreeProvider = openApiTreeProvider; | ||
} | ||
|
||
public getName(): string { | ||
return `${treeViewId}.addAllToSelectedEndpoints`; | ||
} | ||
|
||
public async execute(openApiTreeNode: OpenApiTreeNode): Promise<void> { | ||
this._openApiTreeProvider.select(openApiTreeNode, true, true); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
vscode/microsoft-kiota/src/commands/open-api-tree-view/addToSelectedEndpointsCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { treeViewId } from "../../constants"; | ||
import { OpenApiTreeNode, OpenApiTreeProvider } from "../../openApiTreeProvider"; | ||
import { Command } from "../Command"; | ||
|
||
export class AddToSelectedEndpointsCommand extends Command { | ||
private _openApiTreeProvider: OpenApiTreeProvider; | ||
|
||
constructor(openApiTreeProvider: OpenApiTreeProvider) { | ||
super(); | ||
this._openApiTreeProvider = openApiTreeProvider; | ||
} | ||
|
||
public getName(): string { | ||
return `${treeViewId}.addToSelectedEndpoints`; | ||
} | ||
|
||
public async execute(openApiTreeNode: OpenApiTreeNode): Promise<void> { | ||
this._openApiTreeProvider.select(openApiTreeNode, true, false); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
vscode/microsoft-kiota/src/commands/open-api-tree-view/filterDescriptionCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { treeViewId } from "../../constants"; | ||
import { OpenApiTreeProvider } from "../../openApiTreeProvider"; | ||
import { filterSteps } from "../../steps"; | ||
import { Command } from "../Command"; | ||
|
||
export class FilterDescriptionCommand extends Command { | ||
|
||
private _openApiTreeProvider: OpenApiTreeProvider; | ||
|
||
constructor(openApiTreeProvider: OpenApiTreeProvider) { | ||
super(); | ||
this._openApiTreeProvider = openApiTreeProvider; | ||
} | ||
|
||
public getName(): string { | ||
return `${treeViewId}.filterDescription`; | ||
} | ||
|
||
public async execute(): Promise<void> { | ||
await filterSteps(this._openApiTreeProvider.filter, | ||
x => this._openApiTreeProvider.filter = x); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
vscode/microsoft-kiota/src/commands/open-api-tree-view/openDocumentationPageCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as vscode from "vscode"; | ||
|
||
import { treeViewId } from "../../constants"; | ||
import { OpenApiTreeNode } from "../../openApiTreeProvider"; | ||
import { Command } from "../Command"; | ||
|
||
export class OpenDocumentationPageCommand extends Command { | ||
|
||
public getName(): string { | ||
return `${treeViewId}.openDocumentationPage`; | ||
} | ||
|
||
public async execute(node: OpenApiTreeNode): Promise<void> { | ||
node.documentationUrl && vscode.env.openExternal(vscode.Uri.parse(node.documentationUrl)); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
.../microsoft-kiota/src/commands/open-api-tree-view/removeAllFromSelectedEndpointsCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { treeViewId } from "../../constants"; | ||
import { OpenApiTreeNode, OpenApiTreeProvider } from "../../openApiTreeProvider"; | ||
import { Command } from "../Command"; | ||
|
||
export class RemoveAllFromSelectedEndpointsCommand extends Command { | ||
private _openApiTreeProvider: OpenApiTreeProvider; | ||
|
||
constructor(openApiTreeProvider: OpenApiTreeProvider) { | ||
super(); | ||
this._openApiTreeProvider = openApiTreeProvider; | ||
} | ||
|
||
public getName(): string { | ||
return `${treeViewId}.removeAllFromSelectedEndpoints`; | ||
} | ||
|
||
public async execute(openApiTreeNode: OpenApiTreeNode): Promise<void> { | ||
this._openApiTreeProvider.select(openApiTreeNode, false, true); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
vscode/microsoft-kiota/src/commands/open-api-tree-view/removeFromSelectedEndpointsCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { treeViewId } from "../../constants"; | ||
import { OpenApiTreeNode, OpenApiTreeProvider } from "../../openApiTreeProvider"; | ||
import { Command } from "../Command"; | ||
|
||
export class RemoveFromSelectedEndpointsCommand extends Command { | ||
private _openApiTreeProvider: OpenApiTreeProvider; | ||
|
||
constructor(openApiTreeProvider: OpenApiTreeProvider) { | ||
super(); | ||
this._openApiTreeProvider = openApiTreeProvider; | ||
} | ||
|
||
public getName(): string { | ||
return `${treeViewId}.removeFromSelectedEndpoints`; | ||
} | ||
|
||
public async execute(openApiTreeNode: OpenApiTreeNode): Promise<void> { | ||
this._openApiTreeProvider.select(openApiTreeNode, false, false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters