Skip to content

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

Merged
merged 9 commits into from
Apr 9, 2025

Conversation

DedSec256
Copy link
Collaborator

No description provided.

@DedSec256 DedSec256 force-pushed the ber.a/frontendTypingAssist branch from f9943a8 to 82f4e8d Compare March 25, 2025 14:32
@DedSec256 DedSec256 force-pushed the ber.a/frontendTypingAssist branch from dae6bc1 to 3b625d2 Compare March 31, 2025 17:10
@DedSec256 DedSec256 requested a review from auduchinok March 31, 2025 23:49
)

override fun isApplicable(testCase: String) =
testCase.startsWith("Enter")
Copy link
Member

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?

Copy link
Collaborator Author

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.

Comment on lines 88 to 89
abstract fun isApplicable(sourceFile: String): Boolean
abstract fun isSupported(sourceFile: String): Boolean
Copy link
Member

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?

Copy link
Collaborator Author

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.

@DedSec256 DedSec256 force-pushed the ber.a/frontendTypingAssist branch from c85e9f8 to 26135a8 Compare April 8, 2025 19:10
@DedSec256 DedSec256 force-pushed the ber.a/frontendTypingAssist branch from 26135a8 to 2c64707 Compare April 8, 2025 19:12
@DedSec256 DedSec256 requested a review from auduchinok April 9, 2025 14:14
Copy link
Member

@auduchinok auduchinok left a 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. :)

@DedSec256 DedSec256 force-pushed the ber.a/frontendTypingAssist branch from 92fa119 to 7821b69 Compare April 9, 2025 21:13
@DedSec256 DedSec256 merged commit 30a577e into main Apr 9, 2025
1 check failed
@DedSec256 DedSec256 deleted the ber.a/frontendTypingAssist branch April 9, 2025 21:42
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

Successfully merging this pull request may close these issues.

2 participants