Browse Source

#1864: Add asm highlighting to ILSpy

pull/1880/head
Siegfried Pammer 6 years ago
parent
commit
5707dcb675
  1. 3
      ILSpy/ILSpy.csproj
  2. 1211
      ILSpy/TextView/Asm-Mode.xshd
  3. 10
      ILSpy/TextView/DecompilerTextView.cs

3
ILSpy/ILSpy.csproj

@ -283,6 +283,8 @@ @@ -283,6 +283,8 @@
<EmbeddedResource Condition=" '$(COMPUTERNAME)' != 'DANIEL-E590' " Include="Properties\Resources.zh-Hans.resx" />
<Resource Include="Images\ILSpy.ico" />
<EmbeddedResource Include="TextView\CSharp-Mode.xshd" />
<EmbeddedResource Include="TextView\ILAsm-Mode.xshd" />
<EmbeddedResource Include="TextView\Asm-Mode.xshd" />
<None Include="app.config" />
<None Include="app.manifest" />
<None Include="Properties\app.config.template" />
@ -318,7 +320,6 @@ @@ -318,7 +320,6 @@
<Compile Include="TreeNodes\ThreadingSupport.cs" />
<Compile Include="TreeNodes\TypeTreeNode.cs" />
<EmbeddedResource Include="README.txt" />
<EmbeddedResource Include="TextView\ILAsm-Mode.xshd" />
</ItemGroup>
<ItemGroup>

1211
ILSpy/TextView/Asm-Mode.xshd

File diff suppressed because it is too large Load Diff

10
ILSpy/TextView/DecompilerTextView.cs

@ -102,6 +102,16 @@ namespace ICSharpCode.ILSpy.TextView @@ -102,6 +102,16 @@ namespace ICSharpCode.ILSpy.TextView
}
});
HighlightingManager.Instance.RegisterHighlighting(
"Asm", new string[] { ".s", ".asm" },
delegate {
using (Stream s = typeof(DecompilerTextView).Assembly.GetManifestResourceStream(typeof(DecompilerTextView), "Asm-Mode.xshd")) {
using (XmlTextReader reader = new XmlTextReader(s)) {
return HighlightingLoader.Load(reader, HighlightingManager.Instance);
}
}
});
InitializeComponent();
this.referenceElementGenerator = new ReferenceElementGenerator(this.JumpToReference, this.IsLink);

Loading…
Cancel
Save