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

Generate interface implementation members #129

Merged
merged 26 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5c0aa40
Add parsing tests for IInterfaceImplementation
mcon May 25, 2020
e214878
Added tests which should pass for interface implementation.
mcon May 25, 2020
bf5d69f
IsAvailable passes tests (trailing `with` not working ATM though)
mcon May 25, 2020
1fd9c4f
Added method to produce member binding.
mcon May 26, 2020
3dd7dd7
Remove duplicate tests.
mcon May 28, 2020
f1fd39b
First working cut of interface implementation generation.
mcon May 28, 2020
08ff731
Added missing testcases.
mcon Jun 5, 2020
7f42fd8
Update code to pass new tests.
mcon Jun 5, 2020
a2417e2
Make member argument parameters accessible.
mcon Jun 5, 2020
81e6e28
Remove unused test.
mcon Jun 5, 2020
47e8d3f
Update code and tests to cover the tuple arguments case fully.
mcon Jun 5, 2020
3dd0de7
Add test for no space after comma.
mcon Jun 5, 2020
310e6da
Merge branch 'net202' into add-interface-implementation
mcon Aug 3, 2020
4dd5198
Add new parser testcase for curried members.
mcon Aug 3, 2020
b9372b2
Merge branch 'net203' into add-interface-implementation
auduchinok Sep 25, 2020
52b1f34
Cleanup
auduchinok Sep 25, 2020
14dd387
Simplify element factory members
auduchinok Sep 26, 2020
3d7f9d2
Implement QF instead of CA
auduchinok Sep 28, 2020
b272042
Take editor.config into account when getting settings store
auduchinok Sep 28, 2020
40bb08e
Add IInterfaceImplementation.FcsEntity
auduchinok Sep 28, 2020
849a2dd
Merge branch 'net203' into add-interface-implementation
auduchinok Oct 7, 2020
69dc4e7
Generate interface members fix fixes
auduchinok Oct 7, 2020
d0950a0
Handle escaped names
auduchinok Oct 7, 2020
39cb8d3
Handle inherited interfaces
auduchinok Oct 7, 2020
8ecbde4
Merge branch 'net203' into add-interface-implementation
auduchinok Oct 8, 2020
1b02ead
Handle overloads
auduchinok Oct 8, 2020
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
Prev Previous commit
Next Next commit
Add test for no space after comma.
  • Loading branch information
mcon committed Jun 5, 2020
commit 3dd0de75003621e4667f1c1f4735bd3efef9d92e
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type IPrintable =
abstract member Print1 : unit -> unit
abstract member Print2 : string -> unit
abstract member Print3 : namedString:string * namedInt:int -> unit
abstract member Print4 : string * int -> namedInt:int -> unit

type SomeClass1(x: int, y: float) =
interface IPrintable{caret}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type IPrintable =
abstract member Print1 : unit -> unit
abstract member Print2 : string -> unit
abstract member Print3 : namedString:string * namedInt:int -> unit
abstract member Print4 : string * int -> namedInt:int -> unit

type SomeClass1(x: int, y: float) =
interface IPrintable with
member this.Print1 () = failwith "todo"
member this.Print2 var0 = failwith "todo"
member this.Print3 (namedString,namedInt) = failwith "todo"
member this.Print4 (var1,var2) namedInt = failwith "todo"{caret}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace JetBrains.ReSharper.Plugins.FSharp.Tests.Features

open JetBrains.ReSharper.Plugins.FSharp.Psi.Features.Intentions
open JetBrains.ReSharper.Plugins.FSharp.Services.Formatter
open JetBrains.ReSharper.Plugins.FSharp.Tests.Features
open JetBrains.ReSharper.TestFramework
open NUnit.Framework

type GenerateMissingInterfaceImplementationTest() =
Expand All @@ -10,6 +12,8 @@ type GenerateMissingInterfaceImplementationTest() =
override x.ExtraPath = "generateMissingInterfaceImplementation"

[<Test>] member x.``Empty interface implementation - concrete``() = x.DoNamedTest()
[<TestSetting(typeof<FSharpFormatSettingsKey>, "SpaceAfterComma", "false")>]
[<Test>] member x.``Empty interface implementation - concrete with settings``() = x.DoNamedTest()
[<Test>] member x.``Empty interface implementation - generics``() = x.DoNamedTest()

type GenerateMissingInterfaceImplementationAvailabilityTest() =
Expand Down