Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -86,12 +86,6 @@ type FSharpQuickDocPresenter(xmlDocService: FSharpXmlDocService, identifier: IFS
richTextEscapeToHtml text +
"</pre></div>"

let createToolTip (header: RichText) (body: RichText) =
if body.IsEmpty then
asContent header
else
(asDefinition header).Append(body)

member x.CreateRichTextTooltip() =
FSharpQuickDoc.getFSharpToolTipText identifier
|> Option.map (fun (ToolTipText layouts) ->
Expand All @@ -110,6 +104,7 @@ type FSharpQuickDocPresenter(xmlDocService: FSharpXmlDocService, identifier: IFS
if not overload.TypeMapping.IsEmpty then
yield overload.TypeMapping |> List.map richText |> richTextJoin "\n" ]
|> richTextJoin "\n\n"
|> asDefinition

let body =
[ match xmlDocService.GetXmlDoc(overload.XmlDoc, overload.Symbol, identifier.GetPsiModule()) with
Expand All @@ -122,7 +117,7 @@ type FSharpQuickDocPresenter(xmlDocService: FSharpXmlDocService, identifier: IFS
| _ -> () ]
|> richTextJoin "\n\n"

createToolTip header body))
header.Append(body)))
|> richTextJoin IdentifierTooltipProvider.RIDER_TOOLTIP_SEPARATOR
)
|> Option.defaultValue null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,11 @@ open JetBrains.Util
[<SolutionComponent(InstantiationEx.LegacyDefault)>]
[<ZoneMarker(typeof<IReSharperHostNetFeatureZone>, typeof<IRiderProductEnvironmentZone>, typeof<IRiderFeatureZone>)>]
type FSharpExtendedFileStructureLanguage() =
let filters: IStructureTreeElementFilter array = [| StructureTreeElementFilter() |]

interface IExtendedFileStructureLanguage with
member this.IsValid(languageType) =
isNotNull languageType && languageType.Is<FSharpLanguage>()

member this.GetFilters() = filters

type StructureTreeElementFilter() =
interface IStructureTreeElementFilter with
member this.IsVisibleInStructureTree(element) =
not (element :? IFSharpGeneratedElement)
member this.AppendNonMatchedNodes = false


[<Language(typeof<FSharpLanguage>)>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public bool HasMemberWithName(string shortName, bool ignoreCase) =>
public override AccessRights GetAccessRights() =>
ProvidedType.IsPublic || ProvidedType.IsNestedPublic ? AccessRights.PUBLIC : AccessRights.PRIVATE;

public bool IsClosed => false;
public override bool IsAbstract => ProvidedType.IsAbstract;
public override bool IsSealed => ProvidedType.IsSealed;
public override string XMLDocId => XMLDocUtil.GetTypeElementXmlDocId(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public IPsiSourceFile GetSingleOrDefaultSourceFile() =>
Union.GetSingleOrDefaultSourceFile();

public override bool IsStatic => true;
public bool IsClosed => false;

public IEnumerable<IField> Constants
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'>val a: int</div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'>val a: int</pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'>val b: int</div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'>val b: int</pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'>val a: int</div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'>val a: int</pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'>val b: int</div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'>val b: int</pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'>3</div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'>3</pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'>"<Test Solution Path>"</div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'>"<Test Solution Path>"</pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'>"Source file 01.fs"</div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'>"Source file 01.fs"</pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'><span style="color:#000080">val</span> <span style="color:#000000">argv</span>: <span style="color:#000000">string</span> <span style="color:#000000">array</span></div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'><span style="color:#000080">val</span> <span style="color:#000000">argv</span>: <span style="color:#000000">string</span> <span style="color:#000000">array</span></pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'><span style="color:#000080">val</span> <span style="color:#000000">_arg1</span>: <span style="color:#000000">'a</span></div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'><span style="color:#000080">val</span> <span style="color:#000000">_arg1</span>: <span style="color:#000000">'a</span></pre></div>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class='content'><span style="color:#000080">module</span> <span style="color:#000000">Submodule</span><br><br>from Module</div>
<div class='definition'><pre style='word-wrap: break-word; white-space: pre-wrap;'><span style="color:#000080">module</span> <span style="color:#000000">Submodule</span><br><br>from Module</pre></div>
Loading