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

Go to a specific handler if there are a couple of them #53

Open
ArtemGold opened this issue Aug 2, 2023 · 6 comments
Open

Go to a specific handler if there are a couple of them #53

ArtemGold opened this issue Aug 2, 2023 · 6 comments
Assignees

Comments

@ArtemGold
Copy link

In my project, I have more than one handler for every command, when I use "Go to HandlR" or a shortcut for it, it goes to the last one in my solution tree, most frequently I need the first one, does that plugin have the ability to choose what actual handler I need?

@kzryzstof
Copy link
Owner

Interesting... Would it be possible to provide a short - minimal example of requests / handlers mimicking your use case so that I can try to reproduce it and -hopefully- find a solution?

@kzryzstof kzryzstof self-assigned this Aug 2, 2023
@ArtemGold
Copy link
Author

ArtemGold commented Aug 3, 2023

Ok, I'll try.
I have 4 projects in a solution:
Abstractions - where stored actual command.
Application - where the business logic and handler for that command do some job. Have reference to Abstractions.
API - where I have endpoints. The user calls the endpoint and the API creates a new command, that is handled by the Application. Have reference to Abstractions and Application.
Client - where I have a handler for the same command. This project is a NuGet package and can be used somewhere else. Handler logic calls the API endpoint from above. Also, have a reference to Abstractions and register Client's handler in another application.

So in this architecture, I have 2 handlers for each command, one in the Application, and one in the Client, all in one solution.
Is this enough to understand?

@kzryzstof
Copy link
Owner

Thank you for the information! I will try to reproduce this use case to confirm the behavior.

@kzryzstof
Copy link
Owner

I have been investigating this on and off. The part that I do not get is the interaction between the resharper backend (C#) and the IntelliJ frontend... I have not found a proper working sample yet.

@ArtemGold
Copy link
Author

ArtemGold commented Nov 30, 2023

Sorry for the long response.
Do you mean you don't know how to implement or reproduce?

@kzryzstof
Copy link
Owner

@ArtemGold I have been able to reproduce the issue. Ideally, in such situation, the plugin would open a dialog box with the different handlers to choose from. However, the UI part in a Rider / ReSharper plugin is far from being straight forward. I tried a couple times in the past few months to support a UI component in the plugin but all these attempts have been unsuccessful.

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

2 participants