Saving an Intellij project programmatically - intellij-idea

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();

Related

Short cut for moving tabs in IntelliJ IDEA

Is there a shortcut for moving an editor tab to right/left in IntelliJ IDEA like you can do with chrome tabs via ctrl+shift+[PgUp/PgDown]?
If not, is there a way to achieve this via macros?
You can use the TabMover plugin for this. I have not tried this myself, but by it description it seems that it would work for you.

List active shortcuts in Intellij

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):

How to reopen ViewPart?

I am working to make an Eclipse Plugin. I used a plugin project template that generated a View class which extends ViewPart. I think that it is part of SWT.
My problem is that the View is like a window inside of the main Frame which has buttons for close, minimize. I clicked on the X button of the View by mistake. Now I cannot make it visible again even if I relaunch the Eclipse Application.
Now, my Eclipse application looks like this:
It had some panels and buttons before. But I cannot make the View visible again. How should I make to bring it back? I have tried to delete the plugin project from Eclipse and import it again. But it did not work.
I bet that there it is an easy way to make the View visible again but I do not know how. Is there any setting through MANIFEST file? Or other file?
Specify the -clearPersistedState argument when you run the RCP (this assumes you are using Eclipse 4.x).
1) quick solution
restart workbench with clear workspace option checked under run configuration ..
2) Full Solution
you should add a menu in menu bar to open your view so that you can open your view when ever you want
create a command say openMyMenu
create a handler for it and call below code from handler execute method.
add that command to main menu bar..
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(<view ID>);

Seeking plugin for displaying keyboard shortcuts in Webstorm

I'm looking for a webstorm plugin that would help me remember keyboard shortcuts. I know for a fact that this plugin exists for IntelliJ, it displays the right-shortcut every time we perform an action without using shortcuts, but I didn't find any thing like this for webstorm?
If you know (and understand) what I'm talking about, can you tell me what plugin could help me with it?
Thanks for your time,
Fabien
Key Promoter plug-in is compatible with WebStorm, you can also use Help | Find Action and type the action name, shortcut will be displayed on the right.

How to rerun programmatically the program (intellij idea plugin)

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