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?
Asked
Active
Viewed 114 times
1 Answers
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.

Community
- 1
- 1

Dmitry Osinovskiy
- 9,999
- 1
- 47
- 38
-
Darn, you're consistently beating me to questions :) – Dmitri Nesteruk Jul 11 '12 at 17:59
-
It's not good idea to get user input inside ExecutePsiTransation. – derigel Jul 11 '12 at 19:59