turbanoff / RunConfigurationAsAction

Provides a way to use IntelliJ run configurations as buttons
24 stars 3 forks source link

Action disappears from menu #1

Closed Krakau closed 4 years ago

Krakau commented 5 years ago

I see that this issue tracker is not used very often since this is first post here but let this be the first issue then.

AND I do understand that this issue is probably something that can not be fixed in the plugin side but if someone has general other solution that would be fine as well!

I run several "configurations" and have assigned shortcut key to one of them with this plugin. When I run other configurations (like run Junit tests from several file) IntelliJ Idea keeps adding those to the top of the list and removes the "old" ones. And by old I mean stuff that I use daily. And for some reason IntelliJ Idea keeps adding some other unnecessary things to the list that I have never even called (like "Cover xxxxxx" or "Profile xxxxxx" or "Debug xxxxxx"). And finally the configuration that I have added the shortcut key for disappears from the list and the shortcut stops working. BUT if I run that same configuration manually then the Configuration AND the shortcut for it appears again to the list and I can use it again!

Very annoying and, as I said, this may be IntelliJ Idea specific but maybe there is an answer here?

turbanoff commented 5 years ago

Not sure if I fully understand this issue. Can you provide test-project and exact steps to reproduce? Also gif with reproduction will be very useful (I use https://www.cockos.com/licecap/ for gif recording).

Krakau commented 5 years ago

Hi! Sorry about late response. Unfortunately I can not provide screenshots or gifs since I am not working on publicly available code here. But I can provide you more data of course!

I am using Mac and IntellijJ version is (IntelliJ Idea Ultimate 2018.2.4).

I have a Java project and I often run different JUnit tests. For example now I have run (separately) 4 tests and 1 class full of tests. And now the command I have keymap bind to stopped working.

If I go to:

  1. Preferences
  2. Keymap
  3. Plug-Ins
  4. Run Configruation as Action

I see these commands under it: Cover testclassname Cover testname1 Cover testname2 Cover testname3 Cover testname4 Create Icon with Text Debug testclassname Debug testname1 Debug testname3 Debug testname4 Debug testname5 Profile testclassname Profile testname1 Profile testname2 Profile testname3 Profile testname4 Run testclassname Run testname1 Run testname2 Run testname3 Run testname4

So as you can see there are 21 commands that were created behind the scenes when I just run those 5 tests. And it seems that 21 is the amount of commands that IntelliJ is able to show by default.

NOW if I run manually the command that I actually want to run the list changes to this: Cover THE COMMAND that I have keymap bind to Cover testclassname Cover testname1 Cover testname2 Cover testname3 Create Icon with Text Debug THE COMMAND that I have keymap bind to Debug testclassname Debug testname1 Debug testname3 Debug testname4 Profile THE COMMAND that I have keymap bind to Profile testclassname Profile testname1 Profile testname2 Profile testname3 Run THE COMMAND that I have keymap bind to Run testclassname Run testname1 Run testname2 Run testname3

And now I am able to trigger the command again using the keymap binding! So the command disappearead from the list when the list was full and now that it is back there again I can use it.

Hopefully this clarified the issue :)

turbanoff commented 4 years ago

Can you please check your run configurations: if they were "saved" or not. Example: изображение As you can see there is 1 saved Run Configration and 4 not saved. If you want to assign shortcut to some configurations it makes sense to save it. I this case IDEA will not delete them. изображение

It has nothing to do with plugin. It just how IntelliJ IDEA manages not saved run configurations: it evicts them if there are too many of them.

Krakau commented 4 years ago

Yeah, sorry. I think that was it! Will have to learn how to use IntelliJ idea better.