Skip to content

Commit 58e63b9

Browse files
committed
enhance: use different icon for Visual Studio Preview
Signed-off-by: leo <[email protected]>
1 parent b95523a commit 58e63b9

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/Models/ExternalTool.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public class VisualStudioInstance
5555

5656
[JsonPropertyName("productPath")]
5757
public string ProductPath { get; set; } = string.Empty;
58+
59+
[JsonPropertyName("isPrerelease")]
60+
public bool IsPrerelease { get; set; } = false;
5861
}
5962

6063
public class JetBrainsState

src/Native/Windows.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,8 @@ private void FindVisualStudio(Models.ExternalToolsFinder finder)
399399
foreach (var instance in instances)
400400
{
401401
var exec = instance.ProductPath;
402-
finder.TryAdd(instance.DisplayName, "vs", () => exec, GenerateCommandlineArgsForVisualStudio);
402+
var icon = instance.IsPrerelease ? "vs-preview" : "vs";
403+
finder.TryAdd(instance.DisplayName, icon, () => exec, GenerateCommandlineArgsForVisualStudio);
403404
}
404405
}
405406
}
3.34 KB
Loading

0 commit comments

Comments
 (0)