How to show access modifiers for classes in IntelliJ IDEA? - intellij-idea

I've recently upgraded to Intellij IDEA 2017.2 and access modifier icons disappeared from my file tree... How to get them back?

UPDATE
Since 2019.2 version you can enable it in the Project view options, toggle the Show Visibility Icons:
For older versions:
This option was disabled intentionally, see this comment for the explanation:
This information was intentionally removed, as we believe that it
brings more clutter than actual value.
To enable it back add -Dide.projectView.show.visibility=true in Help | Edit Custom VM Options.

Since 2019.2 there is actually an easy to use option as described in comment:
you can find this setting in options menu of Project Tool Window. It's called "Show Visibility Icons"

Related

Is there a way to highlight text inserted since the last commit in IntelliJ in the Editor?

I'm talking about getting the same effect you get when you commit/merge/diff and are reviewing your changes.
I would like to have code I added to be highlighted. Right now if you go under VCS, Editor Gutter and VCS annotations, both of them have Foreground disabled. I was wondering if there was a way around this.
There is an IntelliJ plugin called Git Scope that provides the functionality you are looking for.
You can install it by going to Settings > Plugin > Marketplace and searching for "Git Scope".
This is not possible without an additional plugin (see the other answer). With any plugins, your current VCS changes are shown with markers in the gutter.

disable all intention bulbs intellij 2016.1

Is there a way to completely turn off all intentions light bulbs in Intellij 2016.1, so that none ever appear? In older versions, you could apparently edit options/editor.xml, but no such file exists in 2016.1.
I just answered that in hide Intellij Idea yellow light bulb
TL;DR:
Preferences > Appearance > Show intention bulb
Update:
In GoLand 2020.1 (and possibly all InteliJ 2020.1 products) this setting can be found here:
Editor > General > Appearance > Show intention bulb
If that doesn't work for you, type "bulb" in the search field in the Settings. I hope that helps.
Maybe this could help you
https://www.jetbrains.com/help/idea/2016.1/configuring-intention-actions.html?origin=old_help
To configure intention settings using the Settings dialog
By default, all available intention actions that ship with IntelliJ IDEA, are enabled. By changing the Intention Settings, you can disable the actions that are not required for your current working environment.
Open the Settings / Preferences Dialog by choosing File | Settings for Windows and Linux or IntelliJ IDEA | Preferences for OS X, and click Intentions under Editor.
In the Intentions page, clear the check boxes of the intention actions or action categories that you do not currently need.
Selecting or clearing a category affects all intention actions in this category.
Apply changes and close the dialog.

CodeLens style in-context information in IntelliJ IDEA

For a while now, newer versions of Visual Studio have been able to display in-line information for methods, fields etc relating to how many times they may have been referenced or changed and who changed the code last. This feature is known as CodeLens.
Is there any plugin or feature in IntelliJ IDEA similar to this that would be able to display information on an individual class/field/method basis?
(22-Aug-2022 updated) The hints from git blame are also available in the latest IntelliJ IDEA.
==================
(For CodeLens function references feature) Now it's a built-in feature after version IntelliJ IDEA 2020.1.
You can enable it from:
Ref: https://blog.jetbrains.com/idea/2020/03/intellij-idea-2020-1-beta2/
There is no such plugin (yet).
You can of course right click the left gutter (gray editor to the left of the editor) and select "Annotate". That gives you at least the last edit per line.
More similar to your desired feature (but unfortunately not inline):
Select some text (e.g. a method), then right-click Git -> Show History for Selection.
Now there is JetBrains plugin named GitToolBox.
It has some similar functionality, including the current line "blame annotation" at the end of the line with detailed commit information:
This feature is available for Rider, but not for IntelliJ yet.
In Rider it's called Code Vision
You can vote for this feature request in IntelliJ IDEA here

IntelliJ IDEA: how to revoke reformat code / optimize imports dialog?

So I've pressed Do not show this dialog in the future (screenshot taken from the web).
It's been a while and now I want to change default reformat behavior.
I can't seem to find an option to show this dialog again.
Update 2015/10:
In current versions of IntelliJ (and likely Android studio and other IntelliJ based IDEs) there no longer seems to be this option as it is not needed.
⌘+Alt+L no longer shows the dialog, instead it directly reformats the file and gives you a hint that you can display the dialog using ⌘+Alt+Shift+L. That dialog no longer includes Do not show again option.
For older IntelliJ versions these dialogs can be re-enabled in Settings/Editor/General:
Newer versions of IntelliJ or Android studio the dialogs can be found under Settings/Editor in Formatting section

How do I disable the Search Everywhere shortcut?

IntelliJ IDEA 13 has the new Search Anywhere feature. It sounds like it might be useful, but so far it just gets in the way. It's mapped to some kind of magical shift-based shortcut, and it comes up every time I try to shift-click to select text. When this happens, the pop-up flickers and gets into some stuck state, so the only way to get rid of it is to click in the editor pane, which of course loses the selection.
I call the shortcut "magical" because the Search Everywhere action appears in the Settings → Keymap list with no mapping, so I can't remove this mapping the usual way. Searching the dialog for search gives no relevant results.
How can I disable this buggy feature until it's ready for production use, and get back the ability to select text?
To disable the "Search everywhere" feature, you need to invoke "Go to action" (Ctrl+Shift+A), then type "Registry...".
Scroll down to "ide.suppress.double.click.handler" and check the box.
Source: https://youtrack.jetbrains.com/issue/IDEA-161094
After updating to build 133.331, I tried assigning a normal shortcut to it in Settings → Keymap, and that made it stop appearing on double-shift.
The settings for the new version have changed
Version: IDEA 2021.2.3
Preference > Advanced Settings
Scroll down to "User Interface", find "Disable double modifier key shortcuts" and check the box.
It's called Search Everywhere, and it's present in keymap.
For me it's perfectly disabled.
EDIT As I'v found it is hardcoded now, and will popup at doubleshift source
There is also an issue at jira, about this problem.
I hope it will be fixed soon.
from: https://youtrack.jetbrains.com/issue/IDEA-161094
In IDEA 2021.2:
You could enable the Settings (Preference on macOS) |
Advanced Settings | Disable double modifier key shortcuts option to
disable it.
This problem is still present under linux (ubuntu amd64 16.10 ) on Android Studio using X11Rdp for remote connection, maybe in other situations too - the Search Everywhere dialog appear on single Shift press.
The answer is here
https://youtrack.jetbrains.com/issue/IDEA-114933#comment=27-603899
Basically you need to
Open lib/resources.jar/idea/PlatformActions.xml and remove or comment such line:
<action id="SearchEverywhere" class="com.intellij.ide.actions.SearchEverywhereAction" />
and repack the jar.
Since end of 2017 you can add -Dide.suppress.double.click.handler=true to the custom VM options: cf. the answer from JetBrains.