Skip to content

Commit

Permalink
Begin package.json context menu command.
Browse files Browse the repository at this point in the history
  • Loading branch information
allisterb committed Nov 20, 2024
1 parent 9716e21 commit 45b689b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 41 deletions.
3 changes: 3 additions & 0 deletions src/Stratis.VS.SolidityProjectBuildTasks/CompileContracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public class CompileContracts : Task
[Required]
public string ExtDir { get; set; }

[Required]
public string ProjectDir { get; set; }

[Required]
public ITaskItem[] Contracts { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion src/Stratis.VS.StratisEVM/BuildSystem/Solidity.targets
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

<UsingTask TaskName="CompileContracts" AssemblyFile="$(LocalAppData)\CustomProjectSystems\Solidity\Tools\Stratis.VS.SolidityProjectBuildTasks.dll"/>
<Target Name="Build">
<CompileContracts ExtDir="$(ExtDir)" Contracts="@(Contract)" />
<CompileContracts ExtDir="$(ExtDir)" ProjectDir="$(MSBuildProjectDirectory)" Contracts="@(Contract)" />
</Target>

<Target Name="Rebuild">
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/Stratis.VS.StratisEVM/Stratis.VS.StratisEVM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="SolidityProjectItemContextMenuProvider.cs" />
<Compile Include="SolidityProjectMenuCommands.cs" />
<Compile Include="SolidityProjectMonikers.cs" />
<Compile Include="SolidityProjectTreePropertiesProvider.cs" />
Expand Down
7 changes: 7 additions & 0 deletions src/Stratis.VS.StratisEVM/StratisEVMPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ namespace Stratis.VS.StratisEVM
expression: "(SingleProject | MultipleProjects) & Solidity",
termNames: new[] { "SingleProject", "MultipleProjects", "Solidity" },
termValues: new[] { SolutionHasSingleProject_string, SolutionHasMultipleProjects_string, "HierSingleSelectionName:.sol$" })]
[ProvideUIContextRule(NPMFileUIContextRule,
name: "NPM Configuration Files",
expression: "(SingleProject | MultipleProjects) & Solidity",
termNames: new[] { "SingleProject", "MultipleProjects", "Solidity" },
termValues: new[] { SolutionHasSingleProject_string, SolutionHasMultipleProjects_string, "HierSingleSelectionName:package.json$" })]
public sealed class StratisEVMPackage : AsyncPackage, IVsSolutionEvents7
{
/// <summary>
Expand All @@ -53,6 +58,8 @@ public sealed class StratisEVMPackage : AsyncPackage, IVsSolutionEvents7
public const string PackageGuidString = "711b90a1-97e6-4b9a-91c4-3d62ccd32d4e";

public const string SolidityFileUIContextRule = "82268519-FB9D-4B7E-8B01-2A311F4181E2";

public const string NPMFileUIContextRule = "9A7CA75A-FA6E-45B2-B6E9-4BFF0AB7BB88";
#region Constructors
static StratisEVMPackage()
{
Expand Down

0 comments on commit 45b689b

Please sign in to comment.