-
Notifications
You must be signed in to change notification settings - Fork 54
Frontend/Typing Assists: initital support for 'Enter' in sync with backend #829
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
Conversation
f9943a8
to
82f4e8d
Compare
dae6bc1
to
3b625d2
Compare
) | ||
|
||
override fun isApplicable(testCase: String) = | ||
testCase.startsWith("Enter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this check actually required? Can we check tests
instead, like in isSupported
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test cases use the ReSharper typing assist specifying format, which the IntelliJ IDEA infrastructure does not understand. In this PR, I am currently using the hardcoded IdeActions.Enter action. It's possible to write separate logic that would retrieve the comment specifying the key press/action from the file and convert it to the IntelliJ IDEA format; this would eliminate the need to check isApplicable. But it hasn't been done yet.
abstract fun isApplicable(sourceFile: String): Boolean | ||
abstract fun isSupported(sourceFile: String): Boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need two methods here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to use the first method to select from all tests those intended for our scenario (for example, Enter).
The second method allows grouping available tests into those that are supported and those that are not.
Those that are not supported will fail if they begin to be supported.
...rp/src/main/java/com/jetbrains/rider/plugins/fsharp/editorActions/FSharpTypingAssistUtils.kt
Outdated
Show resolved
Hide resolved
...src/main/java/com/jetbrains/rider/plugins/fsharp/editorActions/FSharpEnterHandlerDelegate.kt
Outdated
Show resolved
Hide resolved
c85e9f8
to
26135a8
Compare
26135a8
to
2c64707
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DedSec256 Very nice, thanks! Now we only need to always remember to update the frontend typing assists when changing the backend ones, oh. :)
92fa119
to
7821b69
Compare
No description provided.