├── images
├── menu.PNG
└── window.PNG
├── Sitefinity-VSIX.Shared
├── Shared
│ ├── ExitCode.cs
│ ├── InputDialog.xaml
│ ├── ConfigParser.cs
│ ├── Constants.cs
│ ├── VSHelpers.cs
│ ├── InputDialog.xaml.cs
│ └── CliDownloader.cs
├── VSCommandTable.cs
├── Commands
│ ├── DynamicCommand.cs
│ └── AboutCommand.cs
├── Sitefinity-VSIX.Shared.shproj
├── Sitefinity-VSIX.Shared.projitems
├── VSPackage.resx
└── vNextPackage.cs
├── Sitefinity-VSIX
├── app.config
├── Properties
│ └── AssemblyInfo.cs
├── source.extension.vsixmanifest
└── Sitefinity-VSIX.csproj
├── LICENSE.md
├── Sitefinity-VSIX.VS22
├── Properties
│ └── AssemblyInfo.cs
├── source.extension.vsixmanifest
└── Sitefinity-VSIX.VS22.csproj
├── Sitefinity-VSIX.sln
├── SharedFiles
└── VSCommandTable.vsct
├── NOTICE.txt
├── CONTRIBUTING.md
├── README.md
└── .gitignore
/images/menu.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitefinity/Sitefinity-VSIX/HEAD/images/menu.PNG
--------------------------------------------------------------------------------
/images/window.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitefinity/Sitefinity-VSIX/HEAD/images/window.PNG
--------------------------------------------------------------------------------
/Sitefinity-VSIX.Shared/Shared/ExitCode.cs:
--------------------------------------------------------------------------------
1 | namespace Sitefinity_VSIX.Shared
2 | {
3 | public enum ExitCode
4 | {
5 | OK = 0,
6 | GeneralError = 1,
7 | InsufficientPermissions = 2
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Sitefinity-VSIX/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright © 2022 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/Sitefinity-VSIX.Shared/VSCommandTable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.Design;
3 |
4 | namespace Sitefinity_VSIX
5 | {
6 | internal sealed partial class PackageGuids
7 | {
8 | public const string guidPackageString = "c65a7dcd-f890-4bd5-9d62-c032cf4358da";
9 | public const string guidPackageCommandSetString = "668f2cd7-b6fd-416b-a58a-a80112fd33f7";
10 | public static readonly Guid guidPackage = new Guid("c65a7dcd-f890-4bd5-9d62-c032cf4358da");
11 | public static readonly Guid guidPackageCommandSet = new Guid("668f2cd7-b6fd-416b-a58a-a80112fd33f7");
12 | }
13 |
14 | internal sealed partial class PackageIds
15 | {
16 | public const int DynamicCommandId = 0x0100;
17 | public const int AboutCommandId = 0x200;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Sitefinity-VSIX.Shared/Commands/DynamicCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.Design;
3 | using Microsoft.VisualStudio.Shell;
4 |
5 | namespace Sitefinity_VSIX.Commands
6 | {
7 | internal sealed class DynamicCommand : OleMenuCommand
8 | {
9 | private Predicate matches;
10 |
11 | public DynamicCommand(CommandID rootId, Predicate matches, EventHandler invokeHandler, EventHandler beforeQueryStatusHandler)
12 | : base(invokeHandler, null, beforeQueryStatusHandler, rootId)
13 | {
14 | if (matches == null)
15 | {
16 | throw new ArgumentNullException("matches");
17 | }
18 |
19 | this.matches = matches;
20 | }
21 |
22 | public override bool DynamicItemMatch(int cmdId)
23 | {
24 | if (this.matches(cmdId))
25 | {
26 | this.MatchedCommandId = cmdId;
27 | return true;
28 | }
29 |
30 | this.MatchedCommandId = 0;
31 | return false;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Sitefinity-VSIX.Shared/Sitefinity-VSIX.Shared.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 55098d12-d255-4a29-83b2-e9b4b13cdfa5
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sitefinity-VSIX.Shared/Shared/InputDialog.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Sitefinity-VSIX.Shared/Shared/ConfigParser.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 |
4 | namespace Sitefinity_VSIX.Shared
5 | {
6 | internal class ConfigParser
7 | {
8 | public ConfigParser(string pathToConfigFile)
9 | {
10 | this.Parse(pathToConfigFile);
11 | }
12 |
13 | public List Commands
14 | {
15 | get;
16 | private set;
17 | }
18 |
19 | private void Parse(string pathToConfigFile)
20 | {
21 | using (StreamReader reader = new StreamReader(pathToConfigFile))
22 | {
23 | string content = reader.ReadToEnd();
24 | this.Commands = Newtonsoft.Json.JsonConvert.DeserializeObject>(content);
25 | }
26 | }
27 | }
28 |
29 | public class Command
30 | {
31 | public string Title;
32 | public string Name;
33 | public List Args;
34 | public List