-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
57 additions
and
56 deletions.
There are no files selected for viewing
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
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,18 @@ | ||
import * as vscode from "vscode"; | ||
import type { EnvironmentContent } from "../../types"; | ||
|
||
export class EnvironmentFileTreeItem extends vscode.TreeItem { | ||
constructor( | ||
public readonly name: string, | ||
public readonly uri: vscode.Uri, | ||
public readonly content: EnvironmentContent, | ||
public readonly collapsibleState: vscode.TreeItemCollapsibleState = vscode | ||
.TreeItemCollapsibleState.Collapsed | ||
) { | ||
super(name, collapsibleState); | ||
this.contextValue = "file"; | ||
this.uri = uri; | ||
this.tooltip = this.uri.fsPath; | ||
this.iconPath = vscode.ThemeIcon.File; | ||
} | ||
} |
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,18 @@ | ||
import * as vscode from "vscode"; | ||
import type { EnvironmentKeyValue } from "../../types"; | ||
import { EnvironmentFileTreeItem } from "./EnvironmentFileTreeItem"; | ||
|
||
export class EnvironmentKeyValueTreeItem extends vscode.TreeItem { | ||
constructor( | ||
public readonly key: string, | ||
public readonly value: EnvironmentKeyValue, | ||
public readonly parent: EnvironmentFileTreeItem, | ||
public readonly collapsibleState: vscode.TreeItemCollapsibleState = vscode | ||
.TreeItemCollapsibleState.None | ||
) { | ||
super(key, collapsibleState); | ||
this.contextValue = `keyValue-${this.value.type}`; | ||
this.tooltip = this.value.value; | ||
this.description = this.value.value; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/classes/TreeItems/EnvironmentWorkspaceFolderTreeItem.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,14 @@ | ||
import * as vscode from "vscode"; | ||
|
||
export class EnvironmentWorkspaceFolderTreeItem extends vscode.TreeItem { | ||
constructor( | ||
public readonly folder: vscode.WorkspaceFolder, | ||
public readonly collapsibleState: vscode.TreeItemCollapsibleState = vscode | ||
.TreeItemCollapsibleState.Collapsed | ||
) { | ||
super(folder.name, collapsibleState); | ||
this.contextValue = "workspaceFolder"; | ||
this.tooltip = this.folder.uri.fsPath; | ||
this.iconPath = vscode.ThemeIcon.Folder; | ||
} | ||
} |
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