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

Add support for targeting more F# types/methods #118

Open
jcansdale opened this issue Jun 12, 2018 · 0 comments
Open

Add support for targeting more F# types/methods #118

jcansdale opened this issue Jun 12, 2018 · 0 comments

Comments

@jcansdale
Copy link
Owner

jcansdale commented Jun 12, 2018

Asking @TIHan about this here:
https://twitter.com/jcansdale/status/1017660377201610753

The code to support this in C# looks like this:

        async Task DocCommentIdCaretPosAsync(IVsEditorAdaptersFactoryService editorAdapter, IVsTextManager textManager)
        {
            ErrorHandler.ThrowOnFailure(textManager.GetActiveView(1, null, out IVsTextView activeView));
            activeView.GetCaretPos(out int line, out int col);
            activeView.GetNearestPosition(line, col, out int pos, out int vspace);

            var textView = editorAdapter.GetWpfTextView(activeView);

            var document = textView.TextSnapshot.GetOpenDocumentInCurrentContextWithChanges();
            var semanticModel = await document.GetSemanticModelAsync();
            var symbol = semanticModel.GetEnclosingSymbol(pos);
            Console.WriteLine(symbol.GetDocumentationCommentId());
        }

I just need to find the F# equivalent! 😄

Add support for top level namespace declaration in FSharp files. Currently TestDriven.Net only looks for module declarations.

See also:
https://stackoverflow.com/questions/44360348/f-unit-test-error-xunit-net-testdriven-net
https://twitter.com/rahulpnath/status/1006407482963456001

@jcansdale jcansdale changed the title Add support for FSharp top level namespace Add support for targeting more F# types/methods Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant