@@ -17,48 +17,8 @@ module SignatureData =
1717 let line = editor.selection.active.line
1818 let col = editor.selection.active.character
1919
20- LanguageService.generateDocumentation document.fileName ( int line) ( int col)
21- |> Promise.bind ( fun ( p : SignatureDataResult ) ->
22- promise {
23- let pms =
24- p.Data.Parameters
25- |> Seq.concat
26- |> Seq.where ( fun prm -> String.IsNullOrWhiteSpace prm.Name |> not )
27- |> Seq.map ( fun prm -> sprintf """ /// <param name="%s "></param>""" prm.Name)
28- |> String.concat " \n "
29-
30- let generics =
31- p.Data.Generics
32- |> Seq.map ( fun generic -> sprintf """ /// <typeparam name="'%s "></typeparam>""" generic)
33- |> String.concat " \n "
34-
35- let comment =
36- [ yield " /// <summary>"
37- yield " /// "
38- yield " /// </summary>"
39- if pms <> " " then yield pms
40- if generics <> " " then yield generics
41- yield " /// <returns></returns>" ]
42- |> String.concat " \n "
43-
44- let x = editor.selection.active.line
45- let t = document.getText ( vscode.Range.Create( x, 0. , x, 1000. ))
46- let t ' = t.TrimStart( ' ' )
47- let spsC = t.Length - t'.Length
48- let sps = String.replicate spsC " "
49-
50- let cmnt =
51- comment
52- |> String.split [| '\n' |]
53- |> Seq.map ( fun n -> sprintf " %s%s " sps n)
54- |> String.concat " \n "
55-
56- let edit = vscode.WorkspaceEdit.Create()
57- edit.insert ( document.uri, vscode.Position.Create( x, 0. ), cmnt + " \n " )
58- return ! workspace.applyEdit edit
59- })
60- |> ignore
61- | _ -> ()
20+ LanguageService.generateDocumentation ( document.uri, document.version) ( int line, int col)
21+ | _ -> Promise.lift ()
6222
6323
6424 let activate ( context : ExtensionContext ) =
0 commit comments