Browse Source

Show filename for assemblies.

pull/1/head
Daniel Grunwald 15 years ago
parent
commit
937f0e6cec
  1. 2
      ILSpy/AssemblyTreeNode.cs
  2. 6
      ILSpy/Disassembler/ILLanguage.cs
  3. 2
      ILSpy/Language.cs
  4. 5
      ILSpy/TextView/ILAsm-Mode.xshd

2
ILSpy/AssemblyTreeNode.cs

@ -212,7 +212,7 @@ namespace ICSharpCode.ILSpy
public override void Decompile(Language language, ITextOutput output, DecompilationOptions options) public override void Decompile(Language language, ITextOutput output, DecompilationOptions options)
{ {
language.DecompileAssembly(assemblyTask.Result, output, options); language.DecompileAssembly(assemblyTask.Result, fileName, output, options);
} }
} }
} }

6
ILSpy/Disassembler/ILLanguage.cs

@ -18,6 +18,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using Mono.Cecil; using Mono.Cecil;
namespace ICSharpCode.ILSpy.Disassembler namespace ICSharpCode.ILSpy.Disassembler
@ -69,8 +70,11 @@ namespace ICSharpCode.ILSpy.Disassembler
new ReflectionDisassembler(output, detectControlStructure, options.CancellationToken).DisassembleNamespace(nameSpace, types); new ReflectionDisassembler(output, detectControlStructure, options.CancellationToken).DisassembleNamespace(nameSpace, types);
} }
public override void DecompileAssembly(AssemblyDefinition assembly, ITextOutput output, DecompilationOptions options) public override void DecompileAssembly(AssemblyDefinition assembly, string fileName, ITextOutput output, DecompilationOptions options)
{ {
output.WriteCommentLine("// " + fileName);
output.WriteCommentLine("");
new ReflectionDisassembler(output, detectControlStructure, options.CancellationToken).WriteAssemblyHeader(assembly); new ReflectionDisassembler(output, detectControlStructure, options.CancellationToken).WriteAssemblyHeader(assembly);
} }

2
ILSpy/Language.cs

@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy
{ {
} }
public virtual void DecompileAssembly(AssemblyDefinition assembly, ITextOutput output, DecompilationOptions options) public virtual void DecompileAssembly(AssemblyDefinition assembly, string fileName, ITextOutput output, DecompilationOptions options)
{ {
} }

5
ILSpy/TextView/ILAsm-Mode.xshd

@ -1,7 +1,6 @@
<SyntaxDefinition name="ILAsm" extensions=".il" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008"> <SyntaxDefinition name="ILAsm" extensions=".il" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="Green" exampleText="// comment" /> <Color name="Comment" foreground="Green" exampleText="// comment" />
<Color name="String" foreground="Magenta" exampleText="&quot;Hello, World!&quot;" /> <Color name="String" foreground="Magenta" exampleText="&quot;Hello, World!&quot;" />
<Color name="NumberLiteral" foreground="DarkBlue" exampleText="3.1415" />
<Color name="Instructions" foreground="Blue" exampleText="nop;" /> <Color name="Instructions" foreground="Blue" exampleText="nop;" />
<Color name="Keywords" foreground="Blue" fontWeight="bold" exampleText="true" /> <Color name="Keywords" foreground="Blue" fontWeight="bold" exampleText="true" />
<Color name="Directives" foreground="Green" fontWeight="bold" exampleText=".class" /> <Color name="Directives" foreground="Green" fontWeight="bold" exampleText=".class" />
@ -504,10 +503,6 @@
<Begin>"</Begin> <Begin>"</Begin>
<End>"</End> <End>"</End>
</Span> </Span>
<Rule color="NumberLiteral">\b0[xX][0-9a-fA-F]+|\b(\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?</Rule>
<!--<Rule color="Punctuation">
[?,.;()\[\]{}+\-/%*&lt;&gt;^+~!|&amp;]+
</Rule>-->
</RuleSet> </RuleSet>
<RuleSet name="CommentMarkerSet" ignoreCase="false"> <RuleSet name="CommentMarkerSet" ignoreCase="false">
<Keywords foreground="#FFFF0000" fontWeight="bold"> <Keywords foreground="#FFFF0000" fontWeight="bold">

Loading…
Cancel
Save