Browse Source

Allow to open ILSpy on project references under "Dependencies"

pull/2454/head
Andreas Weizel 4 years ago
parent
commit
04a615a3f2
  1. 16
      ILSpy.AddIn/Commands/OpenReferenceCommand.cs
  2. 10
      ILSpy.AddIn/ILSpyAddIn.en-US.vsct
  3. 7
      ILSpy.AddIn/ILSpyAddIn.vsct
  4. 10
      ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct
  5. 1
      ILSpy.AddIn/ILSpyAddInPackage.cs
  6. 1
      ILSpy.AddIn/PkgCmdID.cs

16
ILSpy.AddIn/Commands/OpenReferenceCommand.cs

@ -68,14 +68,6 @@ namespace ICSharpCode.ILSpy.AddIn.Commands @@ -68,14 +68,6 @@ namespace ICSharpCode.ILSpy.AddIn.Commands
return;
}
// Handle NuGet references
var nugetRefItem = NuGetReferenceForILSpy.Detect(itemObject);
if (nugetRefItem != null)
{
OpenAssembliesInILSpy(nugetRefItem.GetILSpyParameters());
return;
}
// Handle project references
var projectRefItem = ProjectReferenceForILSpy.Detect(itemObject);
if (projectRefItem != null)
@ -96,6 +88,14 @@ namespace ICSharpCode.ILSpy.AddIn.Commands @@ -96,6 +88,14 @@ namespace ICSharpCode.ILSpy.AddIn.Commands
OpenAssembliesInILSpy(projectRefItem.GetILSpyParameters());
return;
}
// Handle NuGet references
var nugetRefItem = NuGetReferenceForILSpy.Detect(itemObject);
if (nugetRefItem != null)
{
OpenAssembliesInILSpy(nugetRefItem.GetILSpyParameters());
return;
}
}
internal static void Register(ILSpyAddInPackage owner, uint id)

10
ILSpy.AddIn/ILSpyAddIn.en-US.vsct

@ -67,6 +67,16 @@ @@ -67,6 +67,16 @@
</Strings>
</Button>
<Button guid="guidILSpyAddInCmdSet" id="cmdidOpenProjectReferenceInILSpy" priority="0x0600" type="Button">
<Parent guid="guidILSpyAddInCmdSet" id="OpenILSpyProjectRefGroup" />
<Icon guid="guidImages" id="bmpLogo" />
<CommandFlag>DynamicVisibility</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>
<Strings>
<ButtonText>Open in ILSpy</ButtonText>
</Strings>
</Button>
<Button guid="guidILSpyAddInCmdSet" id="cmdidOpenProjectOutputInILSpy" priority="0x0600" type="Button">
<Parent guid="guidILSpyAddInCmdSet" id="OpenILSpyProjGroup" />
<Icon guid="guidImages" id="bmpLogo" />

7
ILSpy.AddIn/ILSpyAddIn.vsct

@ -56,6 +56,10 @@ @@ -56,6 +56,10 @@
<Group guid="guidILSpyAddInCmdSet" id="OpenILSpyPackageRefGroup" priority="0x0200">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PACKAGEREFERENCE"/>
</Group>
<Group guid="guidILSpyAddInCmdSet" id="OpenILSpyProjectRefGroup" priority="0x0200">
<Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJECTREFERENCE"/>
</Group>
</Groups>
<!--The bitmaps section is used to define the bitmaps that are used for the commands.-->
@ -80,11 +84,13 @@ @@ -80,11 +84,13 @@
<IDSymbol name="OpenILSpyProjGroup" value="0x1030" />
<IDSymbol name="OpenILSpyCodeItemGroup" value="0x1040" />
<IDSymbol name="OpenILSpyPackageRefGroup" value="0x1050" />
<IDSymbol name="OpenILSpyProjectRefGroup" value="0x1060" />
<IDSymbol name="cmdidOpenILSpy" value="0x0100" />
<IDSymbol name="cmdidOpenReferenceInILSpy" value="0x0200" />
<IDSymbol name="cmdidOpenProjectOutputInILSpy" value="0x0300" />
<IDSymbol name="cmdidOpenCodeItemInILSpy" value="0x0400" />
<IDSymbol name="cmdidOpenPackageReferenceInILSpy" value="0x0500" />
<IDSymbol name="cmdidOpenProjectReferenceInILSpy" value="0x0600" />
</GuidSymbol>
<GuidSymbol name="guidImages" value="{2f654db9-4641-4638-9937-27c6202b2a6a}" >
@ -98,6 +104,7 @@ @@ -98,6 +104,7 @@
<GuidSymbol name="guidReferenceContext" value="{D309F791-903F-11D0-9EFC-00A0C911004F}">
<IDSymbol name="IDM_VS_CTXT_PACKAGEREFERENCE" value="0x04A3"/>
<IDSymbol name="IDM_VS_CTXT_PROJECTREFERENCE" value="0x04A7"/>
</GuidSymbol>
</Symbols>

10
ILSpy.AddIn/ILSpyAddIn.zh-Hans.vsct

@ -66,6 +66,16 @@ @@ -66,6 +66,16 @@
<ButtonText>用 ILSpy 打开</ButtonText>
</Strings>
</Button>
<Button guid="guidILSpyAddInCmdSet" id="cmdidOpenProjectReferenceInILSpy" priority="0x0600" type="Button">
<Parent guid="guidILSpyAddInCmdSet" id="OpenILSpyProjectRefGroup" />
<Icon guid="guidImages" id="bmpLogo" />
<CommandFlag>DynamicVisibility</CommandFlag>
<CommandFlag>DefaultInvisible</CommandFlag>
<Strings>
<ButtonText>用 ILSpy 打开</ButtonText>
</Strings>
</Button>
<Button guid="guidILSpyAddInCmdSet" id="cmdidOpenProjectOutputInILSpy" priority="0x0600" type="Button">
<Parent guid="guidILSpyAddInCmdSet" id="OpenILSpyProjGroup" />

1
ILSpy.AddIn/ILSpyAddInPackage.cs

@ -96,6 +96,7 @@ namespace ICSharpCode.ILSpy.AddIn @@ -96,6 +96,7 @@ namespace ICSharpCode.ILSpy.AddIn
OpenProjectOutputCommand.Register(this);
OpenReferenceCommand.Register(this, PkgCmdIDList.cmdidOpenReferenceInILSpy);
OpenReferenceCommand.Register(this, PkgCmdIDList.cmdidOpenPackageReferenceInILSpy);
OpenReferenceCommand.Register(this, PkgCmdIDList.cmdidOpenProjectReferenceInILSpy);
OpenCodeItemCommand.Register(this);
}
#endregion

1
ILSpy.AddIn/PkgCmdID.cs

@ -10,5 +10,6 @@ namespace ICSharpCode.ILSpy.AddIn @@ -10,5 +10,6 @@ namespace ICSharpCode.ILSpy.AddIn
public const uint cmdidOpenProjectOutputInILSpy = 0x300;
public const uint cmdidOpenCodeItemInILSpy = 0x0400;
public const uint cmdidOpenPackageReferenceInILSpy = 0x500;
public const uint cmdidOpenProjectReferenceInILSpy = 0x600;
};
}
Loading…
Cancel
Save