File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
VisualStudioMac.OneClickToOpenFile Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -10,21 +10,20 @@ public class OneClickFileNodeBuilderExt : NodeBuilderExtension
1010 {
1111 public override bool CanBuildNode ( Type dataType )
1212 {
13- var canBuild =
14- typeof ( ProjectFolder ) . IsAssignableFrom ( dataType ) ||
15- typeof ( ProjectFile ) . IsAssignableFrom ( dataType ) ||
16- dataType . Name == "CSharpProject" ;
13+ var canBuild = typeof ( ProjectFile ) . IsAssignableFrom ( dataType ) ;
14+
1715 return canBuild ;
1816 }
1917
2018 public override void BuildNode ( ITreeBuilder treeBuilder , object dataObject , NodeInfo nodeInfo )
2119 {
22- ProjectFile file = ( ProjectFile ) dataObject ;
23- var ext = Path . GetExtension ( file . FilePath ) ;
24-
25- if ( Constants . ExcludedExtensionsFromOneClick . FindIndex ( ( s ) => s == ext ) == - 1 )
20+ if ( dataObject is ProjectFile file )
2621 {
27- nodeInfo . Label = $ "{ nodeInfo . Label } { Constants . OneClickChar } ";
22+ var ext = Path . GetExtension ( file . FilePath ) ;
23+ if ( Constants . ExcludedExtensionsFromOneClick . FindIndex ( ( s ) => s == ext ) == - 1 )
24+ {
25+ nodeInfo . Label = $ "{ nodeInfo . Label } { Constants . OneClickChar } ";
26+ }
2827 }
2928 }
3029
Original file line number Diff line number Diff line change 99 Category = "IDE extensions"
1010) ]
1111
12- [ assembly: AddinName ( "Ivo : One Click To Open File" ) ]
12+ [ assembly: AddinName ( "_Ivo : One Click To Open File" ) ]
1313[ assembly: AddinDescription ( "This extension opens a file with only one click on the solutiontree.\n \n by Ivo Krugers" ) ]
1414[ assembly: AddinAuthor ( "Ivo Krugers" ) ]
1515[ assembly: AddinUrl ( "https://github.com/IvoKrugers/EssentialsAddin" ) ]
You can’t perform that action at this time.
0 commit comments