I want to programmatically rerun(There is a command for this also you can use ctrl-f5) Below is a picture of rhis button in idea
So how I can run this action by myself?
from the answer on intellij idea development forum
Hi Evgeniy,
You should use ExecutionManager.restartRunProfile() for that.
Default IJ implementation achieves that via RestartAction (the one from your screenshot).
Denis
Related
I'm using TestCafe Studio Version 1.4.1 and using visual test recorder. I can't see any way to specify a descriptive name to each test action. I only get names like Click that do not tell me what was clicked. Ideally I would like to add a name like Clicked on submit or other names.
Is it even possible to do this? If yes, how any samples.
At the moment this functionality is not supported. Thank you for the idea. We'll consider it with the team but we can't promise we will be able to implement it though.
I am working on an Intellij Plugin. When a button is pressed I would like to have the project save itself(like when the user modifies code) before the plugin executes. I can't seem to find a way to do this
Use FileDocumentManager.getInstance(project).saveAllDocuments().
You can use ApplicationManager.getApplication().saveAll();
Currently I run with spell check disabled globally in IntelliJ as it ends up being more annoying than helpful most of the time. But there are many times where I'd like to quickly toggle it on and off to check the spelling of things I'm unsure of.
My current workflow in this case is to switch over to sublime then hit my toggle spell check key binding there and then jump back to IntelliJ, which isn't really ideal.
After Google searching around for it all I found was "how to disable spellcheck in IntelliJ" which I already know how to do and searching for "toggle inspection shortcut" was also unfruitful. So does anyone here happen to know if there's a way to bind toggle spell check(or toggle an individual inspection) to a keyboard shortcut in IntelliJ?
If not I might end up writing my own IntelliJ plugin today as I really really want this..
The best thing you can do with out-of-the-box functionality is using Analyze | Run Inspection by Name..., selecting "Typo" from the list and then selecting the scope to run it on.
If you want to run it with a single keyboard shortcut, you'd indeed need to write a simple plugin.
So I ended up making the plugin this late-ish afternoon in a couple hours (thank you yole for telling me it couldn't be done without a plugin before I started work on the plugin). I added the spell check toggle I wanted plus 3 custom toggle bindings that can be bound to any inspection you want.
It's currentley awaiting moderation to get in the JetBrains plugin repository but you can download the plugin jar from my website here.
And I put the source code up on GitHub here
Every time I open a new project in IntelliJ IDEA, the first time I open a particular tool window, for example 'Maven Projects', it appears in 'pinned' mode and remains visible until either I close it, or I go to the view settings for the window (the little cog) and deselect "Pinned Mode". I don't want any of my tool windows to be pinned so this gets a little annoying.
Do you know of a way to change the default behaviour of new project / tool windows?
As far as IJ 2016.2 I don't know about a dedicated setting for this. However I used an approach which allows you to define a default layout for all projects. Although the window-pinning works, which is what this question is about, some may not be persisted, such as Group Modules setting in the maven tool-window.
Nonetheless, to configure the pinning, you need to do 2 simple things, which you can also see in the GIF below:
1) Manually go and unpin all desired windows
2) Open the Windows menu and select Store current layout as default
P.S. If you'll be using tool-windows that you've never opened before, or install new plugins which add their own tool-windows, just follow these steps again.
In Eclipse it is possible to show the active shortcuts with CTRL+Shift+L.
List of shortcuts (depending on the context):
Is there something similar in IntelliJ?
No, there is no such feature in IntelliJ IDEA. It could be implemented as a plugin, but as far as I'm aware such a plugin does not exist.
You may install this intellij plugin :
https://plugins.jetbrains.com/plugin/?id=2391
Actually the best solution for me was Ctrl+Shift+A. Then just type the desired action and you will see the shortcut or you can execute the action.
Example (call hierarchy):