Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich Text Tooltips #1654

Merged
merged 18 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7539a42
Port rich text tooltips from SharpDevelop to ILSpy.
siegfriedpammer Aug 21, 2019
e6edf43
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into fa…
siegfriedpammer Aug 21, 2019
7ee89ab
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into fa…
siegfriedpammer Sep 22, 2019
3913d78
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into fa…
siegfriedpammer Sep 29, 2019
6baecf8
Add Language.GetRichTextTooltip
siegfriedpammer Sep 29, 2019
159ab51
Merge branch 'master' of https://github.com/icsharpcode/ILSpy into fa…
siegfriedpammer Oct 7, 2019
b18876d
Implement semantic highlighting and links in rich text tooltips.
siegfriedpammer Oct 7, 2019
e66f4c2
Fix build.
siegfriedpammer Oct 7, 2019
32b52ef
Adjust width of the tooltip, so signatures are displayed on one line.
siegfriedpammer Oct 8, 2019
c8a3f4c
Add basic support for inheritdoc
siegfriedpammer Oct 8, 2019
a00bd6d
Remove unused Documentation/DocumentationElement.cs
siegfriedpammer Oct 8, 2019
4e5a2c4
Replace AXmlParser with XLinq.
siegfriedpammer Oct 22, 2019
18e8f35
Get rid of RichTextModelOutput
siegfriedpammer Oct 26, 2019
24f51d1
Use correct font size in width calculation
siegfriedpammer Oct 26, 2019
fc6495c
Fix bugs introduced by XLinq migration
siegfriedpammer Oct 26, 2019
6d36627
Limit size of tooltips to MainWindow size.
siegfriedpammer Oct 26, 2019
527dacf
Clean up files.
siegfriedpammer Oct 26, 2019
b108a30
Remove unused TSAB.AddTypeReferenceAnnotations
siegfriedpammer Oct 31, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void ConvertSymbol(ISymbol symbol, TokenWriter writer, CSharpFormattingOp

TypeSystemAstBuilder astBuilder = CreateAstBuilder();
AstNode node = astBuilder.ConvertSymbol(symbol);
writer.StartNode(node);
EntityDeclaration entityDecl = node as EntityDeclaration;
if (entityDecl != null)
PrintModifiers(entityDecl.Modifiers, writer);
Expand Down Expand Up @@ -167,6 +168,7 @@ public void ConvertSymbol(ISymbol symbol, TokenWriter writer, CSharpFormattingOp
} else {
writer.WriteToken(Roles.Semicolon, ";");
}
writer.EndNode(node);
}
}

Expand All @@ -189,7 +191,7 @@ static bool HasParameters(ISymbol e)
TypeSystemAstBuilder CreateAstBuilder()
{
TypeSystemAstBuilder astBuilder = new TypeSystemAstBuilder();
astBuilder.AddTypeReferenceAnnotations = true;
astBuilder.AddResolveResultAnnotations = true;
siegfriedpammer marked this conversation as resolved.
Show resolved Hide resolved
astBuilder.ShowTypeParametersForUnboundTypes = true;
astBuilder.ShowModifiers = (ConversionFlags & ConversionFlags.ShowModifiers) == ConversionFlags.ShowModifiers;
astBuilder.ShowAccessibility = (ConversionFlags & ConversionFlags.ShowAccessibility) == ConversionFlags.ShowAccessibility;
Expand Down
6 changes: 6 additions & 0 deletions ICSharpCode.Decompiler/CSharp/OutputVisitor/ITokenWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public static TokenWriter CreateWriterThatSetsLocationsInAST(TextWriter writer,
var target = new TextWriterTokenWriter(writer) { IndentationString = indentation };
return new InsertSpecialsDecorator(new InsertRequiredSpacesDecorator(new InsertMissingTokensDecorator(target, target)));
}

public static TokenWriter InsertRequiredSpaces(TokenWriter writer)
{
return new InsertRequiredSpacesDecorator(writer);
}

public static TokenWriter WrapInWriterThatSetsLocationsInAST(TokenWriter writer)
{
Expand All @@ -79,6 +84,7 @@ public static TokenWriter WrapInWriterThatSetsLocationsInAST(TokenWriter writer)
public interface ILocatable
{
TextLocation Location { get; }
int Length { get; }
}

public abstract class DecoratingTokenWriter : TokenWriter
Expand Down
Loading