2

I want to create a Resharper ContextAction which takes a string from the user. How can I create a box with an input field whose entered value can be processed inside the ExecutePsiTransation method?

1 Answer 1

3

Just use standard WPF/Windows forms dialogs. For Windows forms use Show/ShowDialog overload that takes IWin32Window instance. For WPF see IWin32Window in WPF . Get instance of IWin32Window via Shell.Instance.GetComponent().MainWindow . And do it not from ExecutePsiTransation, but from ExecuteBeforeProgressAndTransaction method.

Sign up to request clarification or add additional context in comments.

2 Comments

Darn, you're consistently beating me to questions :)
It's not good idea to get user input inside ExecutePsiTransation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.