Change default tool window behaviour in IntelliJ IDEA 2016 - intellij-idea

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.

Related

How can I run the current test with a keybinding in IntelliJ IDEA 2018.2?

Recently upgraded to IDEA 2018.2
In previous versions of IDEA, I was able to bind Run configuration... to a key (ctrl-shift-F10 is what I used) in order to run the current test ("current" meaning the test that my editor cursor was inside).
Note that the functionality itself still exists, you can right-click on test name and select "Run" and it will run that test.
But I can't figure out how to map that functionality to a keyboard now - does anyone know the new way?
EDIT:
The answer below is correct, but be aware that you might need to restart IDEA to pick up the new key mapping.
You can bind a keyboard shortcut of your choice to the action Run context configuration.
If you go to the keymap settings and search for that you should be able to set the keyboard config of your choice and be able to run the current test.
Keep an eye of conflicting keyboard shortcuts (inside and outside intellij!)

Save Tool Window position globally across projects in IntelliJ

I have my Tool Windows in specific parts of the screen (e.g. Version Control and Terminal occupying half of the bottom part) but every time I open a different project with IntelliJ the window positions are back to the default ones. It also opens windows I don't usually use (e.g. Ant Build).
Is there a way to save those settings globally and not per project?
The Window > Store Current Layout as Default and Window > Restore Default Layout options seem to work, with the extra step of having to Restore Default Layout once whenever I first open a new project.
Intellij Docs Reference

IntelliJ - How to use same tool window location for all projects?

I moved some tool windows around, for example Structure shows on right instead of left. When I open a new project, everything goes back to default. I tried to export settings from one but it didn't work
Window | Store Current Layout as Default

Submit Eclipse Project on Perforce

I have a noob Perforce question. I got my perforce plug-in on Eclipse working(for both Java and C).
I have no problems "opening" my perforce stored projects on Eclipse.
Scenario 1:
Whenever I want to change code, I open the project on Eclipse and right-click on it and go to "team" and check out, make changes and then submit. Works fine. But even after that I see a tick mark(indicating check-out) on my perforce screen.
Scenario 2:
I just open perforce code as Eclipse project and make changes(If read only, it prompts and asks if i have to allow write and I say yes). I make changes and save. It doesnt ask for submit. Also if I now open the code on Perforce screen, I already see the new changes made.
Scenario 3:
Just on a Perforce screen, if I check a file out and don't make any changes, I obviously dont want to submit as there are no changes. In this case, how can i "disable" check-out so that my fellow programmers dont think i'm working on it??
Scenario3:
So here are 2 ways i consider a good usage of the plugin:
Use Revert Unchanged Files:
Before you begin development of a feature, checkout the entire tree/branch that your changes will be concentrated around in future. You can do this by right-click the relevant package in package explorer. Once you want to submit, Project->Right-click->Team->Revert Unchanged Files. Now, you can submit your changelist.
This approach stands very useful if you know you will be editing a lot of files or replacing files.
Ofcourse, others can see that you have checked out the files.
Enable Auto checkout:
Incase you are going to make few changes, you should enable autocheckout. This will checkout the file when you begin to make edits. Eclipse->Preferences->Team->Perforce->Enable support for workbench edit..
detailed explainations here. Its a good idea to have this enabled always as it checks out on demand.
However, this does not monitor the filesystem so and code/libs you replace outside of eclipse are not checked out.
For Scenario 3, you can change a workspace option to prevent submitting unchanged files:
SubmitOptions: reverttunchanged
If you have a file checked out (open for edit), others will be able to see that. I guess I'm not clear on why you check a file out if you don't intend to modify it?
If you are going to setup this way and are also using the desktop client, I recommend the following steps in the desktop client:
1.) Open your desktop Perforce client
2.) Click “Connection” on the global menu
3.) Select “Edit Current Workspace…”
4.) Under the “Advanced” tab select “allwrite”
5.) Click Apply, then OK

How to open files in Intellij-IDEA with double click?

My first day using this IDE...
is there a way to configure the IDE to open files in the project by double click? It is rather painful having to drag files from the project overview into the editor window.
You can change the KeyMap.
Go to File->Settings and find the keymap section.
You will have to create a new KeyMap by clicking copy, and then look in the View section for "Jump to Source" and change/add the keymap you want.
However, as Bozhidar Batsov noted, double clicking may not always work so well. Whether it works may vary by OS and/or windowing system. I have no trouble with it in Mac OS X, but it doesn't seem to work well in openSUSE.
There are also other predefined keymaps that you can select from this settings screen. They're set up to resemble other IDEs, so you might find them helpful if you're transitioning from something else.
It is easy way to do in windows.
I found a great solution to this problem by Jelmer Kuperus over at Orange11.
Create an .Xresources file in your home directory. Add the following line:
*multiClickTime: 400
Jelmer explains that this setting changes the default double-click speed from 200ms to 400ms, effectively slowing it down. Save the file and then run:
xrdb ~/.Xresources
The effect is immediate, no need to logout or reboot. Double-click in Intellij works as expected. I did try changing the mouse double-click speed in System Settings first before trying this out to see if that made a difference but it did not.
I am using Ubuntu 11.04, Intellij 10.5.2, and Sun JDK 1.6.0_26. YMMV
Use F4 to open quickly the selected files. Btw double clicking on files should work as well(at least in theory). Swing's buggy handling of such events, however, causes the double click to not always work in IDEA, so I eventually stopped double clicking and switched to using F4. You can also use "Autoscroll to source" from the projects menu - this will open the source files as soon as you select them in the project browser.