Skip to content

Commit 5f94ace

Browse files
authored
Add system-target and binary target icons to Project Panel (#1513)
Missed a few target types when adding icons to the Project Panel. Also adds the target type description to the tooltip to make it more clear what icons correspond to what target type.
1 parent adf0fb4 commit 5f94ace

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/SwiftPackage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface Target {
4242
c99name: string;
4343
path: string;
4444
sources: string[];
45-
type: "executable" | "test" | "library" | "snippet" | "plugin";
45+
type: "executable" | "test" | "library" | "snippet" | "plugin" | "binary" | "system-target";
4646
}
4747

4848
/** Swift Package Manager dependency */

src/ui/ProjectPanelProvider.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ class TargetNode {
239239
item.iconPath = new vscode.ThemeIcon(this.icon());
240240
item.contextValue = this.contextValue();
241241
item.accessibilityInformation = { label: name };
242+
item.tooltip = `${name} (${this.target.type})`;
242243
return item;
243244
}
244245

@@ -252,6 +253,12 @@ class TargetNode {
252253
return "output";
253254
case "library":
254255
return "library";
256+
case "system-target":
257+
return "server";
258+
case "binary":
259+
return "file-binary";
260+
case "plugin":
261+
return "plug";
255262
case "test":
256263
if (this.activeTasks.has(testTaskName(this.name))) {
257264
return LOADING_ICON;
@@ -262,8 +269,6 @@ class TargetNode {
262269
return LOADING_ICON;
263270
}
264271
return "notebook";
265-
case "plugin":
266-
return "plug";
267272
}
268273
}
269274

0 commit comments

Comments
 (0)