File tree Expand file tree Collapse file tree
Snyk.VisualStudio.Extension.2022/UI/Tree Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Snyk Security Changelog
22
3+ ## [ 2.1.1]
4+ ### Changed
5+ ### Fixed
6+ - Title for OSS issue tree node.
7+
38## [ 2.1.0]
49### Changed
510- New Summary Panel for scan information and Net New Issues filtering.
Original file line number Diff line number Diff line change 1- using System . IO ;
1+ using System ;
2+ using System . IO ;
23using System . Linq ;
34
45namespace Snyk . VisualStudio . Extension . UI . Tree
56{
67 public class OssFileTreeNode : FileTreeNode
78 {
89 public OssFileTreeNode ( TreeNode parent ) : base ( parent ) { }
9- public override string Title => this . ProjectName . Replace ( "/" , "\\ " ) + "\\ " + this . DisplayTargetFile ;
10+
11+ public override string Title
12+ {
13+ get
14+ {
15+ var mainDirUri = new Uri ( FolderName ) ;
16+ var fileUri = new Uri ( FileName ) ;
17+ var relativeUri = mainDirUri . MakeRelativeUri ( fileUri ) ;
18+ return Uri . UnescapeDataString ( relativeUri . ToString ( ) ) . Replace ( "/" , "\\ " ) ;
19+ }
20+ }
21+
1022 public override string Icon => SnykIconProvider . GetPackageManagerIcon ( this . PackageManager ) ;
11- private string ProjectName => this . IssueList . FirstOrDefault ( ) ? . AdditionalData ? . ProjectName ?? "" ;
1223 private string PackageManager => this . IssueList . FirstOrDefault ( ) ? . AdditionalData ? . PackageManager ?? "" ;
13- private string DisplayTargetFile => Path . GetFileName ( this . IssueList . FirstOrDefault ( ) ? . AdditionalData ? . DisplayTargetFile ?? "" ) ;
1424 }
1525}
You can’t perform that action at this time.
0 commit comments