|
|
|
|
@ -41,7 +41,7 @@ namespace ICSharpCode.ILSpy.TextView
@@ -41,7 +41,7 @@ namespace ICSharpCode.ILSpy.TextView
|
|
|
|
|
{ |
|
|
|
|
public object Reference; |
|
|
|
|
public bool IsLocal; |
|
|
|
|
public bool IsLocalTarget; |
|
|
|
|
public bool IsDefinition; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
@ -236,10 +236,8 @@ namespace ICSharpCode.ILSpy.TextView
@@ -236,10 +236,8 @@ namespace ICSharpCode.ILSpy.TextView
|
|
|
|
|
int end = this.TextLength; |
|
|
|
|
if (isDefinition) { |
|
|
|
|
this.DefinitionLookup.AddDefinition((module, handle), this.TextLength); |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = (module, handle) }); |
|
|
|
|
} else { |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = (module, handle) }); |
|
|
|
|
} |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = (module, handle), IsDefinition = isDefinition }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void WriteReference(IType type, string text, bool isDefinition = false) |
|
|
|
|
@ -250,10 +248,8 @@ namespace ICSharpCode.ILSpy.TextView
@@ -250,10 +248,8 @@ namespace ICSharpCode.ILSpy.TextView
|
|
|
|
|
int end = this.TextLength; |
|
|
|
|
if (isDefinition) { |
|
|
|
|
this.DefinitionLookup.AddDefinition(type, this.TextLength); |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = type }); |
|
|
|
|
} else { |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = type }); |
|
|
|
|
} |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = type, IsDefinition = isDefinition }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void WriteReference(IMember member, string text, bool isDefinition = false) |
|
|
|
|
@ -264,10 +260,8 @@ namespace ICSharpCode.ILSpy.TextView
@@ -264,10 +260,8 @@ namespace ICSharpCode.ILSpy.TextView
|
|
|
|
|
int end = this.TextLength; |
|
|
|
|
if (isDefinition) { |
|
|
|
|
this.DefinitionLookup.AddDefinition(member, this.TextLength); |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = member }); |
|
|
|
|
} else { |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = member }); |
|
|
|
|
} |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = member, IsDefinition = isDefinition }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void WriteLocalReference(string text, object reference, bool isDefinition = false) |
|
|
|
|
@ -278,10 +272,8 @@ namespace ICSharpCode.ILSpy.TextView
@@ -278,10 +272,8 @@ namespace ICSharpCode.ILSpy.TextView
|
|
|
|
|
int end = this.TextLength; |
|
|
|
|
if (isDefinition) { |
|
|
|
|
this.DefinitionLookup.AddDefinition(reference, this.TextLength); |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = reference, IsLocal = true, IsLocalTarget = true }); |
|
|
|
|
} else { |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = reference, IsLocal = true }); |
|
|
|
|
} |
|
|
|
|
references.Add(new ReferenceSegment { StartOffset = start, EndOffset = end, Reference = reference, IsLocal = true, IsDefinition = isDefinition }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void MarkFoldStart(string collapsedText = "...", bool defaultCollapsed = false) |
|
|
|
|
|