Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Added a global blueprint manager command which displays the globally …
Browse files Browse the repository at this point in the history
…configured blueprint manager rather than the per-project one
  • Loading branch information
Malware committed Aug 12, 2017
1 parent 21894be commit 40a0f0e
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 19 deletions.
1 change: 1 addition & 0 deletions Source/MDK/Commands/CommandIds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ static class CommandIds
public const int CheckForUpdates = 0x103;
public const int DeployProject = 0x0104;
public const int BlueprintManager = 0x0105;
public const int GlobalBlueprintManager = 0x106;
}
}
33 changes: 33 additions & 0 deletions Source/MDK/Commands/GlobalBlueprintManagerCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using Malware.MDKServices;
using MDK.Resources;
using MDK.Views.BlueprintManager;
using MDK.VisualStudio;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;

namespace MDK.Commands
{
sealed class GlobalBlueprintManagerCommand : Command
{
public GlobalBlueprintManagerCommand(ExtendedPackage package) : base(package)
{ }

public override Guid GroupId { get; } = CommandGroups.MDKGroup;

public override int Id { get; } = CommandIds.GlobalBlueprintManager;

protected override void OnBeforeQueryStatus()
{ }

protected override void OnExecute()
{
var package = (MDKPackage)Package;
var model = new BlueprintManagerDialogModel
{
BlueprintPath = package.Options.GetActualOutputPath()
};
BlueprintManagerDialog.ShowDialog(model);
}
}
}
2 changes: 2 additions & 0 deletions Source/MDK/MDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<Compile Include="Build\ScriptPart.cs" />
<Compile Include="Build\UsingDirectiveComparer.cs" />
<Compile Include="Build\WeightedPartSorter.cs" />
<Compile Include="Commands\GlobalBlueprintManagerCommand.cs" />
<Compile Include="Commands\BlueprintManagerCommand.cs" />
<Compile Include="Commands\CommandGroups.cs" />
<Compile Include="Commands\CheckForUpdatesCommand.cs" />
Expand Down Expand Up @@ -159,6 +160,7 @@
<ItemGroup>
<VSCTCompile Include="MDKPackage.vsct">
<ResourceName>Menus.ctmenu</ResourceName>
<SubType>Designer</SubType>
</VSCTCompile>
<Content Include="MIT License.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
2 changes: 1 addition & 1 deletion Source/MDK/MDKPackage.GeneratedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public partial class MDKPackage
/// <summary>
/// The current package version
/// </summary>
public static readonly Version Version = new Version("0.9.34");
public static readonly Version Version = new Version("0.9.36");

/// <summary>
/// Determines whether this version is a prerelease version
Expand Down
3 changes: 2 additions & 1 deletion Source/MDK/MDKPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ protected override void Initialize()
new RefreshWhitelistCacheCommand(this),
new CheckForUpdatesCommand(this),
new ProjectOptionsCommand(this),
new BlueprintManagerCommand(this)
new BlueprintManagerCommand(this),
new GlobalBlueprintManagerCommand(this)
);

base.Initialize();
Expand Down
47 changes: 32 additions & 15 deletions Source/MDK/MDKPackage.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,29 @@
<ButtonText>Deploy All MDK Scripts</ButtonText>
</Strings>
</Button>
<Button guid="guidMDKCmdSet" id="GlobalBlueprintManagerCommandId" priority="0x0101" type="Button">
<Parent guid="guidMDKCmdSet" id="MDKMenuGroup" />
<CommandFlag>DynamicVisibility</CommandFlag>
<!--<Icon guid="guidImages" id="bmpPic1" />-->
<Strings>
<ButtonText>Blueprint Manager</ButtonText>
</Strings>
</Button>
<Button guid="guidMDKCmdSet" id="RefreshWhitelistCacheCommandId" priority="0x0102" type="Button">
<Parent guid="guidMDKCmdSet" id="MDKMenuGroup" />
<CommandFlag>DynamicVisibility</CommandFlag>
<!--<Icon guid="guidImages" id="bmpPic1" />-->
<Strings>
<ButtonText>Refresh Whitelist Cache</ButtonText>
</Strings>
</Button>
<Button guid="guidMDKCmdSet" id="CheckForUpdatesCommandId" priority="0x0103" type="Button">
<Parent guid="guidMDKCmdSet" id="MDKMenuGroup" />
<!--<Icon guid="guidImages" id="bmpPic1" />-->
<Strings>
<ButtonText>Check for Updates</ButtonText>
</Strings>
</Button>
<Button guid="guidMDKCmdSet" id="QuickDeploySolutionCommandId" priority="0x0300" type="Button">
<Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_SOLUTION_BUILD" />
<CommandFlag>DynamicVisibility</CommandFlag>
Expand All @@ -78,6 +101,14 @@
<ButtonText>Deploy All MDK Scripts</ButtonText>
</Strings>
</Button>
<Button guid="guidMDKCmdSet" id="GlobalBlueprintManagerCommandId" priority="0x0400" type="Button">
<Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_SOLUTION_PROPERTIES" />
<CommandFlag>DynamicVisibility</CommandFlag>
<!--<Icon guid="guidImages" id="bmpPic1" />-->
<Strings>
<ButtonText>Blueprint Manager</ButtonText>
</Strings>
</Button>
<Button guid="guidMDKCmdSet" id="DeployProjectCommandId" priority="0x0300" type="Button">
<Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_PROJECT_BUILD" />
<CommandFlag>DynamicVisibility</CommandFlag>
Expand All @@ -102,21 +133,6 @@
<ButtonText>MDK Script Options</ButtonText>
</Strings>
</Button>
<Button guid="guidMDKCmdSet" id="RefreshWhitelistCacheCommandId" priority="0x0102" type="Button">
<Parent guid="guidMDKCmdSet" id="MDKMenuGroup" />
<CommandFlag>DynamicVisibility</CommandFlag>
<!--<Icon guid="guidImages" id="bmpPic1" />-->
<Strings>
<ButtonText>Refresh Whitelist Cache</ButtonText>
</Strings>
</Button>
<Button guid="guidMDKCmdSet" id="CheckForUpdatesCommandId" priority="0x0103" type="Button">
<Parent guid="guidMDKCmdSet" id="MDKMenuGroup" />
<!--<Icon guid="guidImages" id="bmpPic1" />-->
<Strings>
<ButtonText>Check for Updates</ButtonText>
</Strings>
</Button>
</Buttons>

<!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
Expand Down Expand Up @@ -151,6 +167,7 @@
<IDSymbol name="CheckForUpdatesCommandId" value="0x0103" />
<IDSymbol name="DeployProjectCommandId" value="0x0104" />
<IDSymbol name="BlueprintManagerCommandId" value="0x0105" />
<IDSymbol name="GlobalBlueprintManagerCommandId" value="0x0106" />
</GuidSymbol>

<GuidSymbol name="guidImages" value="{016ced72-6df6-4278-a645-5d8a568294d5}" >
Expand Down
2 changes: 1 addition & 1 deletion Source/MDK/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="MDK.Morten Aune Lyrstad.e02b602e-3099-44a5-88c6-cb30cab978f6" Version="0.9.34" Language="en-US" Publisher="Morten Aune Lyrstad" />
<Identity Id="MDK.Morten Aune Lyrstad.e02b602e-3099-44a5-88c6-cb30cab978f6" Version="0.9.36" Language="en-US" Publisher="Morten Aune Lyrstad" />
<DisplayName>MDK/SE</DisplayName>
<Description xml:space="preserve">A toolkit to help with ingame script (programmable block) development for Keen Software House's space sandbox Space Engineers.

Expand Down
2 changes: 1 addition & 1 deletion Source/MDKServices/ProjectScriptInfo.GeneratedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ partial class ProjectScriptInfo
/// <summary>
/// The current package version this utility assembly targets
/// </summary>
public static readonly Version TargetPackageVersion = new Version("0.9.34");
public static readonly Version TargetPackageVersion = new Version("0.9.36");
}
}

0 comments on commit 40a0f0e

Please sign in to comment.