├── .gitignore
├── Doc
├── Images
│ ├── AddGroupIcon.png
│ ├── AddIcon.png
│ ├── ContextMenuGroup.png
│ ├── ContextMenuItem.png
│ ├── CopyCommandlineIcon.png
│ ├── MainWindow.png
│ ├── MoveDownIcon.png
│ ├── MoveUpIcon.png
│ ├── RemoveIcon.png
│ ├── SettingsIcon.png
│ └── ShowAllProjectsIcon.png
├── SmartCommandLineIcon-Readme.png
└── SmartCommandLineIcon.svg
├── GatherVsixFiles.ps1
├── LICENSE.txt
├── MarketplaceOverview.md
├── README.md
├── SmartCmdArgs
├── .editorconfig
├── SharedResources
│ ├── CmdArgsPackage.cs
│ ├── CmdArgsPackage.vsct
│ ├── Key.snk
│ ├── Monikers
│ │ ├── CopyCmdLine.xaml
│ │ ├── FoProjectNode.xaml
│ │ ├── FoProjectNodeOld.xaml
│ │ └── SVGs
│ │ │ ├── CopyCmdLine.svg
│ │ │ ├── FoProjectNode.svg
│ │ │ └── FoProjectNodeOld.svg
│ ├── Resources
│ │ ├── BigIcon.png
│ │ ├── SmartCommandLineIcon.ico
│ │ ├── VSMeuIcon.png
│ │ └── vsix_preview_image.png
│ └── VSPackage.resx
├── SmartCmdArgs.Shared
│ ├── CmdArgsOptionPage.cs
│ ├── CmdArgsPackage.cs
│ ├── Commands.cs
│ ├── CustomMonikers.cs
│ ├── DataSerialization
│ │ ├── DataSerializer.cs
│ │ ├── JsonDataObjects.cs
│ │ ├── ProjectDataSerializer.cs
│ │ ├── SettingsSerializer.cs
│ │ ├── SolutionDataSerializer.cs
│ │ └── SuoDataSerializer.cs
│ ├── Helper
│ │ ├── BindingListEx.cs
│ │ ├── CpsProjectSupport.cs
│ │ ├── Debouncer.cs
│ │ ├── DelayExecution.cs
│ │ ├── EnumDescConverter.cs
│ │ ├── Extensions.cs
│ │ ├── FileSystemWatcherDisabledContext.cs
│ │ ├── FolderSelectDialog.cs
│ │ ├── Logger.cs
│ │ ├── ObservableCollectionEx.cs
│ │ ├── ObservableDictionary.cs
│ │ ├── ObservableItemsRangeCollection.cs
│ │ ├── ObservableRangeCollection.cs
│ │ ├── PathHelper.cs
│ │ ├── PropertyChangedBase.cs
│ │ ├── RelayCommand.cs
│ │ ├── SymbolicLinkUtils.cs
│ │ └── TreeHelper.cs
│ ├── Services
│ │ ├── FileStorageEventHandlingService.cs
│ │ ├── FileStorageService.cs
│ │ ├── ItemAggregationService.cs
│ │ ├── ItemEvaluationService.cs
│ │ ├── ItemPathService.cs
│ │ ├── LifeCycleService.cs
│ │ ├── OptionsSettingsEventHandlingService.cs
│ │ ├── OptionsSettingsService.cs
│ │ ├── ProjectConfigService.cs
│ │ ├── SettingsService.cs
│ │ ├── SuoDataService.cs
│ │ ├── ToolWindowHistory.cs
│ │ ├── TreeViewEventHandlingService.cs
│ │ ├── Utils
│ │ │ ├── AbstractFactory.cs
│ │ │ ├── AsyncInitializable.cs
│ │ │ └── LazyServiceExtension.cs
│ │ ├── ViewModelUpdateService.cs
│ │ ├── VisualStudioHelperService.cs
│ │ └── VsEventHandlingService.cs
│ ├── SmartCmdArgs.Shared.projitems
│ ├── SmartCmdArgs.Shared.shproj
│ ├── ToolWindow.cs
│ ├── View
│ │ ├── ArgumentItemView.xaml
│ │ ├── ArgumentItemView.xaml.cs
│ │ ├── Converter
│ │ │ ├── BoolToBoolConverter.cs
│ │ │ ├── BoolToBoolMultiConverter.cs
│ │ │ ├── BoolToVisibilityConverter.cs
│ │ │ ├── BoolToVisibilityMultiConverter.cs
│ │ │ ├── BooleanBoldFontConverter.cs
│ │ │ ├── ConverterBase.cs
│ │ │ ├── EmptyToVisibilityConverter.cs
│ │ │ ├── FontSizeConverter.cs
│ │ │ ├── ItemMonikerConverter.cs
│ │ │ ├── ItemTagTextConverter.cs
│ │ │ ├── ItemTagVisibilityConverter.cs
│ │ │ ├── ItemVisibilityConverter.cs
│ │ │ ├── MultiConverterBase.cs
│ │ │ ├── NullToVisibilityConverter.cs
│ │ │ ├── NullToVisibilityMultiConverter.cs
│ │ │ ├── StringConcatConverter.cs
│ │ │ └── TreeLevelMarginConverter.cs
│ │ ├── DragDrop.cs
│ │ ├── DropTargetAdorner.cs
│ │ ├── RedBorderAdorner.cs
│ │ ├── SetCustomDelimiterControl.xaml
│ │ ├── SetCustomDelimiterControl.xaml.cs
│ │ ├── SetCustomDelimiterDialog.cs
│ │ ├── SettingsControl.xaml
│ │ ├── SettingsControl.xaml.cs
│ │ ├── SettingsDialog.cs
│ │ ├── ToggleButtonEx.cs
│ │ ├── ToolWindowControl.xaml
│ │ ├── ToolWindowControl.xaml.cs
│ │ ├── TreeItemStyleSelector.cs
│ │ ├── TreeViewEx.cs
│ │ ├── TreeViewStyles.xaml
│ │ └── UserControls
│ │ │ ├── SettingsCheckBox.xaml
│ │ │ └── SettingsCheckBox.xaml.cs
│ ├── ViewModel
│ │ ├── CmdBase.cs
│ │ ├── CmdContainer.cs
│ │ ├── CmdGroup.cs
│ │ ├── CmdItem.cs
│ │ ├── CmdProject.cs
│ │ ├── DataObjectGenerator.cs
│ │ ├── SettingsViewModel.cs
│ │ ├── ToolWindowViewModel.cs
│ │ ├── TreeEvents.cs
│ │ └── TreeViewModel.cs
│ └── Wrapper
│ │ └── IVsHierarchyWrapper.cs
├── SmartCmdArgs.sln
├── SmartCmdArgs15
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SmartCmdArgs15.args.json
│ ├── SmartCmdArgs15.csproj
│ ├── SmartCmdArgs15.imagemanifest
│ ├── source.extension.cs
│ └── source.extension.vsixmanifest
├── SmartCmdArgs16
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SmartCmdArgs16.args.json
│ ├── SmartCmdArgs16.csproj
│ ├── SmartCmdArgs16.imagemanifest
│ ├── source.extension.cs
│ └── source.extension.vsixmanifest
├── SmartCmdArgs17
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SmartCmdArgs17.args.json
│ ├── SmartCmdArgs17.csproj
│ ├── SmartCmdArgs17.imagemanifest
│ ├── source.extension.cs
│ └── source.extension.vsixmanifest
└── Testing
│ ├── SmartCmdArgs.Tests.Shared
│ ├── LanguageSpecificTests.cs
│ ├── SmartCmdArgs.Tests.Shared.projitems
│ ├── SmartCmdArgs.Tests.Shared.shproj
│ ├── TestBase.cs
│ ├── UiActionTests.cs
│ └── Utils
│ │ ├── Config.cs
│ │ └── Helper.cs
│ ├── SmartCmdArgs.Tests
│ ├── Services
│ │ ├── ItemAggregationServiceTests.cs
│ │ ├── ItemEvaluationServiceTests.cs
│ │ └── ItemPathServiceTests.cs
│ ├── SmartCmdArgs.Tests.csproj
│ └── Utils
│ │ └── Extensions.cs
│ ├── SmartCmdArgs15.Tests
│ └── SmartCmdArgs15.Tests.csproj
│ ├── SmartCmdArgs16.Tests
│ └── SmartCmdArgs16.Tests.csproj
│ ├── SmartCmdArgs17.Tests
│ └── SmartCmdArgs17.Tests.csproj
│ └── TestSolutions
│ ├── C#_.NetCore
│ ├── CollectArgsDistinctTest
│ │ ├── Project1
│ │ │ ├── Program.cs
│ │ │ ├── Project1.csproj
│ │ │ └── Properties
│ │ │ │ └── launchSettings.json
│ │ └── Solution.sln
│ ├── CollectArgsTest
│ │ ├── Project1
│ │ │ ├── Program.cs
│ │ │ ├── Project1.csproj
│ │ │ └── Properties
│ │ │ │ └── launchSettings.json
│ │ ├── Solution.ArgsCfg.json
│ │ └── Solution.sln
│ ├── DefaultProject
│ │ ├── Project1
│ │ │ ├── Program.cs
│ │ │ └── Project1.csproj
│ │ └── Solution.sln
│ └── ReadCmdArgsProject
│ │ ├── Project1
│ │ ├── Program.cs
│ │ └── Project1.csproj
│ │ └── Solution.sln
│ ├── C#_.NetFW
│ ├── CollectArgsDistinctTest
│ │ ├── Project1
│ │ │ ├── App.config
│ │ │ ├── Program.cs
│ │ │ ├── Project1.csproj
│ │ │ ├── Project1.csproj.user
│ │ │ └── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ └── Solution.sln
│ ├── CollectArgsTest
│ │ ├── Project1
│ │ │ ├── App.config
│ │ │ ├── Program.cs
│ │ │ ├── Project1.csproj
│ │ │ ├── Project1.csproj.user
│ │ │ └── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ ├── Solution.ArgsCfg.json
│ │ └── Solution.sln
│ ├── DefaultProject
│ │ ├── Project1
│ │ │ ├── App.config
│ │ │ ├── Program.cs
│ │ │ ├── Project1.csproj
│ │ │ └── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ └── Solution.sln
│ └── ReadCmdArgsProject
│ │ ├── Project1
│ │ ├── App.config
│ │ ├── Program.cs
│ │ ├── Project1.csproj
│ │ └── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── Solution.sln
│ ├── C++
│ ├── CollectArgsDistinctTest
│ │ ├── Project1
│ │ │ ├── Project1.cpp
│ │ │ ├── Project1.vcxproj
│ │ │ ├── Project1.vcxproj.filters
│ │ │ ├── Project1.vcxproj.user
│ │ │ ├── ReadMe.txt
│ │ │ ├── stdafx.cpp
│ │ │ ├── stdafx.h
│ │ │ └── targetver.h
│ │ └── Solution.sln
│ ├── CollectArgsTest
│ │ ├── Project1
│ │ │ ├── Project1.cpp
│ │ │ ├── Project1.vcxproj
│ │ │ ├── Project1.vcxproj.filters
│ │ │ ├── Project1.vcxproj.user
│ │ │ ├── ReadMe.txt
│ │ │ ├── stdafx.cpp
│ │ │ ├── stdafx.h
│ │ │ └── targetver.h
│ │ ├── Solution.ArgsCfg.json
│ │ └── Solution.sln
│ ├── DefaultProject
│ │ ├── Project1
│ │ │ ├── Project1.cpp
│ │ │ ├── Project1.vcxproj
│ │ │ ├── Project1.vcxproj.filters
│ │ │ ├── ReadMe.txt
│ │ │ ├── stdafx.cpp
│ │ │ ├── stdafx.h
│ │ │ └── targetver.h
│ │ └── Solution.sln
│ └── ReadCmdArgsProject
│ │ ├── Project1
│ │ ├── Project1.cpp
│ │ ├── Project1.vcxproj
│ │ ├── Project1.vcxproj.filters
│ │ ├── ReadMe.txt
│ │ ├── stdafx.cpp
│ │ ├── stdafx.h
│ │ └── targetver.h
│ │ └── Solution.sln
│ ├── F#_.NetFW
│ ├── CollectArgsDistinctTest
│ │ ├── Project1
│ │ │ ├── App.config
│ │ │ ├── AssemblyInfo.fs
│ │ │ ├── Program.fs
│ │ │ └── Project1.fsproj
│ │ └── Solution.sln
│ ├── CollectArgsTest
│ │ ├── Project1
│ │ │ ├── App.config
│ │ │ ├── AssemblyInfo.fs
│ │ │ ├── Program.fs
│ │ │ └── Project1.fsproj
│ │ ├── Solution.ArgsCfg.json
│ │ └── Solution.sln
│ ├── DefaultProject
│ │ ├── Project1
│ │ │ ├── App.config
│ │ │ ├── AssemblyInfo.fs
│ │ │ ├── Program.fs
│ │ │ └── Project1.fsproj
│ │ └── Solution.sln
│ └── ReadCmdArgsProject
│ │ ├── Project1
│ │ ├── App.config
│ │ ├── AssemblyInfo.fs
│ │ ├── Program.fs
│ │ └── Project1.fsproj
│ │ └── Solution.sln
│ ├── Node.js
│ ├── CollectArgsDistinctTest
│ │ ├── Project1
│ │ │ ├── Project1.njsproj
│ │ │ ├── README.md
│ │ │ ├── Scripts
│ │ │ │ └── typings
│ │ │ │ │ └── node
│ │ │ │ │ └── node.d.ts
│ │ │ ├── app.ts
│ │ │ └── package.json
│ │ └── Solution.sln
│ ├── CollectArgsTest
│ │ ├── Project1
│ │ │ ├── Project1.njsproj
│ │ │ ├── README.md
│ │ │ ├── Scripts
│ │ │ │ └── typings
│ │ │ │ │ └── node
│ │ │ │ │ └── node.d.ts
│ │ │ ├── app.ts
│ │ │ └── package.json
│ │ ├── Solution.ArgsCfg.json
│ │ └── Solution.sln
│ ├── DefaultProject
│ │ ├── Project1
│ │ │ ├── Project1.njsproj
│ │ │ ├── README.md
│ │ │ ├── Scripts
│ │ │ │ └── typings
│ │ │ │ │ └── node
│ │ │ │ │ └── node.d.ts
│ │ │ ├── app.ts
│ │ │ └── package.json
│ │ └── Solution.sln
│ └── ReadCmdArgsProject
│ │ ├── Project1
│ │ ├── Project1.njsproj
│ │ ├── README.md
│ │ ├── Scripts
│ │ │ └── typings
│ │ │ │ └── node
│ │ │ │ └── node.d.ts
│ │ ├── app.ts
│ │ └── package.json
│ │ └── Solution.sln
│ └── VB_.NetFW
│ ├── CollectArgsDistinctTest
│ ├── Project1
│ │ ├── App.config
│ │ ├── Module1.vb
│ │ ├── My Project
│ │ │ ├── Application.Designer.vb
│ │ │ ├── Application.myapp
│ │ │ ├── AssemblyInfo.vb
│ │ │ ├── Resources.Designer.vb
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.vb
│ │ │ └── Settings.settings
│ │ ├── Project1.vbproj
│ │ └── Project1.vbproj.user
│ └── Solution.sln
│ ├── CollectArgsTest
│ ├── Project1
│ │ ├── App.config
│ │ ├── Module1.vb
│ │ ├── My Project
│ │ │ ├── Application.Designer.vb
│ │ │ ├── Application.myapp
│ │ │ ├── AssemblyInfo.vb
│ │ │ ├── Resources.Designer.vb
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.vb
│ │ │ └── Settings.settings
│ │ ├── Project1.vbproj
│ │ └── Project1.vbproj.user
│ ├── Solution.ArgsCfg.json
│ └── Solution.sln
│ ├── DefaultProject
│ ├── Project1
│ │ ├── App.config
│ │ ├── Module1.vb
│ │ ├── My Project
│ │ │ ├── Application.Designer.vb
│ │ │ ├── Application.myapp
│ │ │ ├── AssemblyInfo.vb
│ │ │ ├── Resources.Designer.vb
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.vb
│ │ │ └── Settings.settings
│ │ └── Project1.vbproj
│ └── Solution.sln
│ └── ReadCmdArgsProject
│ ├── Project1
│ ├── App.config
│ ├── Module1.vb
│ ├── My Project
│ │ ├── Application.Designer.vb
│ │ ├── Application.myapp
│ │ ├── AssemblyInfo.vb
│ │ ├── Resources.Designer.vb
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.vb
│ │ └── Settings.settings
│ └── Project1.vbproj
│ └── Solution.sln
└── TestProjects
├── BlaBlubb_RenameDummy
├── App.config
├── BlaBlubb_RenameDummy.csproj
├── Program.cs
└── Properties
│ └── AssemblyInfo.cs
├── CPP_Windows
├── CPP_Windows.cpp
├── CPP_Windows.vcxproj
├── CPP_Windows.vcxproj.filters
├── pch.cpp
└── pch.h
├── CS_DotNetCore
├── CS_DotNetCore.csproj
└── Program.cs
├── CS_DotNetFramework
├── App.config
├── CS_DotNetFramework.csproj
├── Program.cs
└── Properties
│ └── AssemblyInfo.cs
├── FS_DotNetCore
├── FS_DotNetCore.fsproj
└── Program.fs
├── JS_NodeJS
├── JS_NodeJS.njsproj
├── README.md
├── app.js
└── package.json
├── PY_Python
├── PY_Python.py
└── PY_Python.pyproj
├── TestProjects.sln
├── VB_DotNetCore
├── Program.vb
└── VB_DotNetCore.vbproj
└── VB_DotNetFramework
├── App.config
├── My Project
├── Application.Designer.vb
├── Application.myapp
├── AssemblyInfo.vb
├── Resources.Designer.vb
├── Resources.resx
├── Settings.Designer.vb
└── Settings.settings
├── Program.vb
└── VB_DotNetFramework.vbproj
/Doc/Images/AddGroupIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/AddGroupIcon.png
--------------------------------------------------------------------------------
/Doc/Images/AddIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/AddIcon.png
--------------------------------------------------------------------------------
/Doc/Images/ContextMenuGroup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/ContextMenuGroup.png
--------------------------------------------------------------------------------
/Doc/Images/ContextMenuItem.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/ContextMenuItem.png
--------------------------------------------------------------------------------
/Doc/Images/CopyCommandlineIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/CopyCommandlineIcon.png
--------------------------------------------------------------------------------
/Doc/Images/MainWindow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/MainWindow.png
--------------------------------------------------------------------------------
/Doc/Images/MoveDownIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/MoveDownIcon.png
--------------------------------------------------------------------------------
/Doc/Images/MoveUpIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/MoveUpIcon.png
--------------------------------------------------------------------------------
/Doc/Images/RemoveIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/RemoveIcon.png
--------------------------------------------------------------------------------
/Doc/Images/SettingsIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/SettingsIcon.png
--------------------------------------------------------------------------------
/Doc/Images/ShowAllProjectsIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/Images/ShowAllProjectsIcon.png
--------------------------------------------------------------------------------
/Doc/SmartCommandLineIcon-Readme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/Doc/SmartCommandLineIcon-Readme.png
--------------------------------------------------------------------------------
/GatherVsixFiles.ps1:
--------------------------------------------------------------------------------
1 | $tag = git describe --tags
2 |
3 | if ($LastExitCode -eq 0 -and -not [string]::IsNullOrWhiteSpace($tag)) {
4 | $filesMap = @{
5 | "SmartCmdArgs\SmartCmdArgs15\bin\Release\SmartCmdArgs15.vsix" = "SmartCmdArgs-vs2017-{0}.vsix";
6 | "SmartCmdArgs\SmartCmdArgs16\bin\Release\SmartCmdArgs16.vsix" = "SmartCmdArgs-vs2019-{0}.vsix";
7 | "SmartCmdArgs\SmartCmdArgs17\bin\Release\SmartCmdArgs17.vsix" = "SmartCmdArgs-vs2022-{0}.vsix";
8 | }
9 |
10 | foreach ($file in $filesMap.Keys) {
11 | $newFileName = $filesMap[$file] -f $tag
12 | $destinationPath = ".\$newFileName"
13 | Copy-Item $file -Destination $destinationPath
14 |
15 | if ($LastExitCode -eq 0) {
16 | Write-Host "Copied and renamed $file to $newFileName successfully."
17 | } else {
18 | Write-Host "Failed to copy $file."
19 | }
20 | }
21 | } else {
22 | Write-Host "Failed to get the latest git tag."
23 | }
--------------------------------------------------------------------------------
/SmartCmdArgs/.editorconfig:
--------------------------------------------------------------------------------
1 | [*Tests.cs]
2 | dotnet_diagnostic.VSTHRD200.severity = none
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/SmartCmdArgs/SharedResources/Key.snk
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Monikers/CopyCmdLine.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Monikers/FoProjectNode.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Monikers/FoProjectNodeOld.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Monikers/SVGs/CopyCmdLine.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
57 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Resources/BigIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/SmartCmdArgs/SharedResources/Resources/BigIcon.png
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Resources/SmartCommandLineIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/SmartCmdArgs/SharedResources/Resources/SmartCommandLineIcon.ico
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Resources/VSMeuIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/SmartCmdArgs/SharedResources/Resources/VSMeuIcon.png
--------------------------------------------------------------------------------
/SmartCmdArgs/SharedResources/Resources/vsix_preview_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MBulli/SmartCommandlineArgs/62008494db06786418797eab09f3174180a9b3ed/SmartCmdArgs/SharedResources/Resources/vsix_preview_image.png
--------------------------------------------------------------------------------
/SmartCmdArgs/SmartCmdArgs.Shared/CustomMonikers.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Imaging.Interop;
2 | using System;
3 |
4 | namespace SmartCmdArgs
5 | {
6 | internal class CustomMonikers
7 | {
8 | private static readonly Guid ManifestGuid = new Guid("cafdbdaf-1847-4824-8957-a169d25d0cfb");
9 |
10 | public static ImageMoniker FoProjectNode => new ImageMoniker { Guid = ManifestGuid, Id = 0 };
11 | public static ImageMoniker CopyCmdLine => new ImageMoniker { Guid = ManifestGuid, Id = 1 };
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SmartCmdArgs.Shared/DataSerialization/DataSerializer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using SmartCmdArgs.ViewModel;
3 |
4 | namespace SmartCmdArgs.DataSerialization
5 | {
6 | class DataSerializer
7 | {
8 | protected static List TransformCmdList(ICollection items)
9 | {
10 | var result = new List(items.Count);
11 | foreach (var item in items)
12 | {
13 | var newElement = new CmdItemJson
14 | {
15 | Id = item.Id,
16 | Command = item.Value,
17 | ProjectConfig = item.ProjectConfig,
18 | ProjectPlatform = item.ProjectPlatform,
19 | LaunchProfile = item.LaunchProfile,
20 |
21 | // not in JSON
22 | Selected = item.IsSelected,
23 | };
24 |
25 | if (item is CmdParameter param)
26 | {
27 | newElement.DefaultChecked = param.DefaultChecked;
28 | newElement.Type = param.ParamType;
29 |
30 | // not in JSON
31 | newElement.Enabled = item.IsChecked ?? false;
32 | }
33 |
34 | if (item is CmdContainer container)
35 | {
36 | newElement.Items = TransformCmdList(container.Items);
37 | newElement.ExclusiveMode = container.ExclusiveMode;
38 | newElement.Delimiter = container.Delimiter;
39 | newElement.Prefix = container.Prefix;
40 | newElement.Postfix = container.Postfix;
41 |
42 | // not in JSON
43 | newElement.Expanded = container.IsExpanded;
44 | }
45 |
46 | result.Add(newElement);
47 | }
48 | return result;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SmartCmdArgs.Shared/DataSerialization/SettingsSerializer.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 | using SmartCmdArgs.Helper;
3 | using SmartCmdArgs.ViewModel;
4 | using System;
5 |
6 | namespace SmartCmdArgs.DataSerialization
7 | {
8 | public class SettingsSerializer
9 | {
10 | public static string Serialize(SettingsViewModel vm)
11 | {
12 | if (vm == null)
13 | throw new ArgumentNullException(nameof(vm));
14 |
15 | var data = new SettingsJson(vm);
16 |
17 | return JsonConvert.SerializeObject(data, Formatting.Indented, new JsonSerializerSettings { DefaultValueHandling = DefaultValueHandling.Ignore });
18 | }
19 |
20 | public static SettingsJson Deserialize(string jsonStr)
21 | {
22 | Logger.Info($"Try to parse settings json: '{jsonStr}'");
23 |
24 | if (string.IsNullOrEmpty(jsonStr))
25 | {
26 | // If the file is empty return empty solution data
27 | Logger.Info("Got empty settings json string. Returning default SettingsJson");
28 | return new SettingsJson();
29 | }
30 |
31 | return JsonConvert.DeserializeObject(jsonStr);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SmartCmdArgs.Shared/Helper/DelayExecution.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.Shell;
2 | using Microsoft.VisualStudio.Threading;
3 | using System;
4 | using System.Threading;
5 | using Task = System.Threading.Tasks.Task;
6 |
7 | namespace SmartCmdArgs.Helper
8 | {
9 | static class DelayExecution
10 | {
11 | internal static void ExecuteAfter(TimeSpan delay, Action action)
12 | {
13 | ExecuteAfter(delay, CancellationToken.None, action);
14 | }
15 |
16 | internal static void ExecuteAfter(TimeSpan delay, CancellationToken cancelToken, Action action)
17 | {
18 | ThreadHelper.JoinableTaskFactory.RunAsync(async () =>
19 | {
20 | await Task.Delay(delay, cancelToken);
21 |
22 | if (!cancelToken.IsCancellationRequested)
23 | {
24 | action();
25 | }
26 | }).Task.Forget();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SmartCmdArgs.Shared/Helper/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | namespace SmartCmdArgs.Helper
6 | {
7 | static class Extensions
8 | {
9 | public static T GetValueOrDefault(this IDictionary dict, K key, T defaultValue = default(T))
10 | {
11 | T item;
12 | return dict.TryGetValue(key, out item) ? item : defaultValue;
13 | }
14 |
15 | public static FileSystemWatcherDisabledContext TemporarilyDisable(this System.IO.FileSystemWatcher watcher)
16 | {
17 | return new FileSystemWatcherDisabledContext(watcher);
18 | }
19 |
20 | public static bool Contains(this string str, string value, StringComparison comparisonType)
21 | {
22 | return str.IndexOf(value, comparisonType) >= 0;
23 | }
24 |
25 | public static void ForEach(this IEnumerable enumerable, Action action)
26 | {
27 | foreach (var item in enumerable)
28 | {
29 | action(item);
30 | }
31 | }
32 |
33 | public static void AddRange(this HashSet that, IEnumerable items)
34 | {
35 | foreach (var item in items)
36 | {
37 | that.Add(item);
38 | }
39 | }
40 |
41 | public static bool HasMultipleItems(this IEnumerable enumerable)
42 | {
43 | return enumerable.Skip(1).Any();
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SmartCmdArgs.Shared/Helper/FileSystemWatcherDisabledContext.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace SmartCmdArgs.Helper
5 | {
6 | class FileSystemWatcherDisabledContext : IDisposable
7 | {
8 | private FileSystemWatcher watcher;
9 |
10 | public FileSystemWatcherDisabledContext(FileSystemWatcher watcher)
11 | {
12 | this.watcher = watcher;
13 |
14 | if (this.watcher != null)
15 | {
16 | this.watcher.EnableRaisingEvents = false;
17 | }
18 | }
19 |
20 | public void Dispose()
21 | {
22 | if (watcher != null)
23 | {
24 | this.watcher.EnableRaisingEvents = true;
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SmartCmdArgs.Shared/Helper/Logger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Microsoft.VisualStudio.Shell;
4 |
5 | namespace SmartCmdArgs.Helper
6 | {
7 | static class Logger
8 | {
9 | private static string LogSource = "SmartCommandlineArgs";
10 |
11 | public static void Info(string message)
12 | {
13 | ActivityLog.TryLogInformation(LogSource, PrependThreadId(message));
14 | WriteToDebugConsole("Info", message);
15 | }
16 |
17 | public static void Warn(string message)
18 | {
19 | ActivityLog.TryLogWarning(LogSource, PrependThreadId(message));
20 | WriteToDebugConsole("Warning", message);
21 | }
22 |
23 | public static void Error(string message, Exception ex = null)
24 | {
25 | ActivityLog.TryLogError(LogSource, AppendException(PrependThreadId(message), ex));
26 | WriteToDebugConsole("Error", message, ex);
27 | }
28 |
29 | [Conditional("DEBUG")]
30 | private static void WriteToDebugConsole(string type, string message, Exception ex = null)
31 | {
32 | Debug.WriteLine($"{LogSource}[{System.Threading.Thread.CurrentThread.ManagedThreadId}]|{type}: {AppendException(message, ex)}");
33 | }
34 |
35 | private static string PrependThreadId(string message)
36 | {
37 | return $"[{System.Threading.Thread.CurrentThread.ManagedThreadId}] {message}";
38 | }
39 |
40 | private static string AppendException(string message, Exception ex)
41 | {
42 | if (ex == null)
43 | return message;
44 |
45 | return message + Environment.NewLine + ex.ToString();
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/SmartCmdArgs/SmartCmdArgs.Shared/Helper/RelayCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Windows.Input;
4 |
5 | namespace SmartCmdArgs.Helper
6 | {
7 | public class RelayCommand : ICommand
8 | {
9 | #region Fields
10 |
11 | readonly Action execute;
12 | readonly Predicate canExecute;
13 |
14 | #endregion
15 |
16 | #region Constructors
17 |
18 | public RelayCommand(Action execute)
19 | : this(execute, null)
20 | {
21 | }
22 |
23 | public RelayCommand(Action execute, Predicate canExecute)
24 | {
25 | if (execute == null)
26 | throw new ArgumentNullException("execute");
27 |
28 | this.execute = execute;
29 | this.canExecute = canExecute;
30 | }
31 | #endregion
32 |
33 | #region ICommand Members
34 |
35 | [DebuggerStepThrough]
36 | public bool CanExecute(object parameter)
37 | {
38 | return canExecute == null || canExecute((T)parameter);
39 | }
40 |
41 | public event EventHandler CanExecuteChanged
42 | {
43 | add { CommandManager.RequerySuggested += value; }
44 | remove { CommandManager.RequerySuggested -= value; }
45 | }
46 |
47 | public void Execute(object parameter)
48 | {
49 | execute((T)parameter);
50 | }
51 |
52 | #endregion
53 | }
54 |
55 | public class RelayCommand : RelayCommand