File tree Expand file tree Collapse file tree 9 files changed +130
-83
lines changed
VisualStudioMac.OneClickToOpenFile Expand file tree Collapse file tree 9 files changed +130
-83
lines changed Original file line number Diff line number Diff line change 11using MonoDevelop . Components . Commands ;
22using MonoDevelop . Ide ;
3- using MonoDevelop . Ide . Gui . Components ;
43using MonoDevelop . Ide . Gui . Pads ;
4+ using VisualStudioMac . OneClickToOpenFile . Extensions ;
55
66namespace VisualStudioMac . OneClickToOpenFile . CommandHandlers
77{
@@ -24,33 +24,4 @@ protected override void Run()
2424 pad . RefreshTree ( ) ;
2525 }
2626 }
27-
28- public static class SolutionPadExtensions
29- {
30- public static void RefreshTree ( this SolutionPad pad )
31- {
32- if ( pad == null )
33- return ;
34-
35- var root = pad . GetRootNode ( ) ;
36- if ( root != null )
37- {
38- root . Expanded = false ;
39- pad . GetTreeView ( ) . RefreshNode ( root ) ;
40- }
41- }
42-
43- private static ITreeNavigator GetRootNode ( this SolutionPad pad )
44- => pad . GetTreeView ( ) . GetRootNode ( ) ;
45-
46- private static ITreeNavigator GetRootNode ( this ExtensibleTreeViewController treeview )
47- {
48- var pos = treeview . GetRootPosition ( ) ;
49- return treeview . GetNodeAtPosition ( pos ) ;
50- }
51-
52- private static ExtensibleTreeViewController GetTreeView ( this SolutionPad pad )
53- => pad . Controller ;
54- }
55- }
56-
27+ }
Original file line number Diff line number Diff line change 22{
33 public static class Constants
44 {
5- public const string Version = "17.3.1" ;
65 public const string OneClickChar
76#if DEBUG
87 = ">>" ;
Original file line number Diff line number Diff line change 1+ using MonoDevelop . Components . Commands ;
2+ using MonoDevelop . Ide ;
3+ using MonoDevelop . Ide . Gui . Components ;
4+ using MonoDevelop . Ide . Gui . Pads ;
5+
6+ namespace VisualStudioMac . OneClickToOpenFile . Extensions
7+ {
8+ public static class SolutionPadExtensions
9+ {
10+ public static void RefreshTree ( this SolutionPad pad )
11+ {
12+ if ( pad == null )
13+ return ;
14+
15+ var root = pad . GetRootNode ( ) ;
16+ if ( root != null )
17+ {
18+ pad . GetTreeView ( ) . RefreshNode ( root ) ;
19+ root . Expanded = true ;
20+ }
21+ }
22+
23+ private static ITreeNavigator GetRootNode ( this SolutionPad pad )
24+ => pad . GetTreeView ( ) . GetRootNode ( ) ;
25+
26+ private static ITreeNavigator GetRootNode ( this ExtensibleTreeViewController treeview )
27+ {
28+ var pos = treeview . GetRootPosition ( ) ;
29+ return treeview . GetNodeAtPosition ( pos ) ;
30+ }
31+
32+ private static ExtensibleTreeViewController GetTreeView ( this SolutionPad pad )
33+ => pad . Controller ;
34+ }
35+ }
Original file line number Diff line number Diff line change 22using Mono . Addins . Description ;
33using VisualStudioMac . OneClickToOpenFile ;
44
5- [ assembly: Addin (
6- Id = "OneClickToOpenFile" ,
7- Namespace = "VisualStudioMac" ,
8- Version = Constants . Version ,
9- Category = "IDE extensions"
10- ) ]
5+ // [assembly: Addin(
6+ // Id = "OneClickToOpenFile",
7+ // Namespace = "VisualStudioMac",
8+ // Version = Constants.Version,
9+ // Category = "IDE extensions"
10+ // )]
1111
12- [ assembly: AddinName ( "One Click To Open File" ) ]
13- [ assembly: AddinDescription ( "This extension opens a file with only one click on the solutiontree.\n \n by Ivo Krugers" ) ]
14- [ assembly: AddinAuthor ( "Ivo Krugers" ) ]
15- [ assembly: AddinUrl ( "https://github.com/IvoKrugers/VisualStudioMac.OneClickToOpenFile" ) ]
12+ // [assembly: AddinName("One Click To Open File")]
13+ // [assembly: AddinDescription("This extension opens a file with only one click on the solutiontree.\n\nby Ivo Krugers")]
14+ // [assembly: AddinAuthor("Ivo Krugers")]
15+ // [assembly: AddinUrl("https://github.com/IvoKrugers/VisualStudioMac.OneClickToOpenFile")]
1616
1717[ assembly: AddinDependency ( "::MonoDevelop.Core" , MonoDevelop . BuildInfo . Version ) ]
1818[ assembly: AddinDependency ( "::MonoDevelop.Ide" , MonoDevelop . BuildInfo . Version ) ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <Addin name = " VSM: One Click To Open File"
3+ id = " OneClickToOpenFile"
4+ namespace = " VisualStudioMac"
5+ author = " Ivo Krugers"
6+ copyright = " MIT X11"
7+ url = " https://github.com/IvoKrugers/VisualStudioMac.OneClickToOpenFile"
8+ description = " This extension opens a file with only one click on the solutiontree.
9+
10+ by Ivo Krugers
11+ "
12+ category = " IDE extensions"
13+ version = " 17.4" >
14+
15+ <Runtime >
16+ <Import assembly =" VisualStudioMac.OneClickToOpenFile.dll" />
17+ </Runtime >
18+
19+ <!-- <Dependencies>
20+ <Addin id="Core" version="17.4"/>
21+ <Addin id="Ide" version="17.4"/>
22+ <Addin id="DotNetCore" version="17.4" />
23+ </Dependencies>-->
24+
25+ <!-- ProjectPad NodeBuilders -->
26+ <Extension path =" /MonoDevelop/Ide/Pads/ProjectPad" >
27+ <NodeBuilder class =" VisualStudioMac.OneClickToOpenFile.NodeBuilderExtensions.OneClickFileNodeBuilderExt" />
28+ </Extension >
29+
30+ <!-- Commands -->
31+ <Extension path =" /MonoDevelop/Ide/Commands" >
32+ <Command id =" VisualStudioMac.OneClickToOpenFile.EnableOneClickToOpenFileCommandHandler"
33+ _label=" One Click To Open File"
34+ defaultHandler=" VisualStudioMac.OneClickToOpenFile.CommandHandlers.EnableOneClickToOpenFileCommandHandler" />
35+ </Extension >
36+
37+ <!-- Main Tool Menu Entries -->
38+ <Extension path =" /MonoDevelop/Ide/MainMenu/Tools" >
39+ <SeparatorItem id =" ExtensionSettingsSeparator" insertafter =" ExtensionSettingsSeparator" />
40+
41+ <CommandItem id =" VisualStudioMac.OneClickToOpenFile.EnableOneClickToOpenFileCommandHandler" insertafter =" ExtensionSettingsSeparator" />
42+
43+ <SeparatorItem id =" ExtensionSettingsSeparatorEnd" insertafter =" ExtensionSettingsSeparatorEnd" />
44+ </Extension >
45+ </Addin >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99 </PropertyGroup >
1010
1111 <ItemGroup >
12- <PackageReference Include =" Microsoft.VisualStudioMac.Sdk" Version =" 17.0.0-preview.7955 " />
12+ <PackageReference Include =" Microsoft.VisualStudioMac.Sdk" Version =" 17.0.0" />
1313
1414 <Reference Include =" Xamarin.Mac" >
1515 <HintPath >\Applications\Visual Studio %28Preview%29.app\Contents\MonoBundle\Xamarin.Mac.dll</HintPath >
1616 <Private >False</Private >
1717 </Reference >
1818 </ItemGroup >
19+ <ItemGroup >
20+ <None Remove =" VisualStudioMac.ExtensionHelper" />
21+ <None Remove =" VisualStudioMac.ExtensionsHelper" />
22+ <None Remove =" Extensions\" />
23+ <None Remove =" MonoDevelop.DotNetCore" />
24+ <None Remove =" MonoDevelop.MacPlatform" />
25+ <None Remove =" MonoDevelop.MonoMac" />
26+ <None Remove =" MonoDevelop.Xamarin.Addins.Core" />
27+ <None Remove =" MonoDevelop.Xamarin.Ide" />
28+ <None Remove =" MonoDevelop.Xamarin.Ide.Mac" />
29+ </ItemGroup >
30+ <ItemGroup >
31+ <Folder Include =" Extensions\" />
32+ </ItemGroup >
1933</Project >
Original file line number Diff line number Diff line change 11#! /bin/sh
2- clear
32
43SCRIPTFILE=$0
54
@@ -10,5 +9,27 @@ cd ${PROJECTFOLDER}
109
1110pwd
1211
12+ PROJECTFOLDER=$( pwd)
13+
1314rm * .mpack
14- mono /Applications/Visual\ Studio.app/Contents/Resources/lib/monodevelop/bin/vstool.exe setup pack ./VisualStudioMac.OneClickToOpenFile/bin/VisualStudioMac.OneClickToOpenFile.dll
15+
16+ # Pack
17+ # mono /Applications/Visual\ Studio\ \(2019\).app/Contents/Resources/lib/monodevelop/bin/vstool.exe setup pack ./VisualStudioMac.OneClickToOpenFile/bin/VisualStudioMac.OneClickToOpenFile.dll
18+ /Applications/Visual\ Studio\ \( Preview\) .app/Contents/MacOS/vstool setup pack /Users/ivokrugers/Xamarin_Projects/VisualStudioMac.OneClickToOpenFile/VisualStudioMac.OneClickToOpenFile/bin/VisualStudioMac.OneClickToOpenFile.dll
19+
20+ # Copy to local dir
21+ for filename in /Applications/Visual\ Studio\ \( Preview\) .app/* OneClickToOpenFile* .mpack;
22+ do
23+ echo " move $filename "
24+ mv " $filename " .
25+ done
26+
27+ # Uninstall
28+ /Applications/Visual\ Studio\ \( Preview\) .app/Contents/MacOS/vstool setup uninstall VisualStudioMac.OneClickToOpenFile -y
29+
30+ # # Install
31+ # for filename in *.mpack;
32+ # do
33+ # echo "$filename"
34+ # /Applications/Visual\ Studio\ \(Preview\).app/Contents/MacOS/vstool setup install "$PROJECTFOLDER/$filename"
35+ # done
You can’t perform that action at this time.
0 commit comments