Why grayed var:colon is added in Java editor in IntelliJ - intellij-idea

I installed IntelliJ 2016.3.2
Build #IC-163.10154.41
Built on Dec.21, 2016
grayed var:colon is automatically added in front of argument in a caller method in Java editor as you see below ( greyed a: b: are added).
Why is this happening? I don't want to see these grayed ones.
How to set it up in config.? (I guess this is occurring in the latest version of IntelliJ since I'm using older version in another machine without this problem.)

The grey names followed by the colon are the parameter names from the method definition.
If you don't want them, right click on a grey word and select Disable Parameter Name Hints.
It's not a bug, it's a feature ;-)
If you want to reactivate it, go to Settings --> Editor --> General --> Appearance --> Option Show parameter name hints

Related

Virtual space before string parameters

My IntelliJ Idea editor leaves a sort of virtual space before string arguments when functions are called (see the string "street" below):
I call it virtual because there's no character to be deleted there, but it can be seen clearly and bothers me. I'm not sure if it's a feature or a bug. I'm using the Community Edition 2016.3 on Ubuntu 16.04.
This is new feature of IDEA 2016.3 called Parameter hints. And it usually looks like:
The idea of it is that editor shows parameter hints for literals and nulls used as method arguments. These hints make code much more readable.
If you find hints redundant for a certain method, you can tell the IDEA not to show hints for this method. To disable hints completely:
uncheck Settings → Editor → General → Appearance → Show parameter name hints.
or just press Ctrl+Shift+A to open Find Action menu and type there parameter hint. Then either click Toggle parameter name hints or Appearance: Show parameter name hints menu item:
The reason why you don't see parameter names may be your UI options. Set the appearance and colors to default values.
You may have changed the code style for Java source code under File | Settings | Editor | Code Style | Java (for Windows and Linux) or IntelliJ IDEA | Preferences | Editor | Code Style | Java(for OS X).
If this is the case you have likely changed either the spacing settings for method opening braces or the spacing settings for method parameters. Just from the image I can't tell which setting is specifically causing this to happen, so could you perhaps edit in a screenshot of the your editor's current code style settings?

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

Disable apostrophe t space Intellij IDEA

When I type in a comment (JavaDoc or line comment) IntelliJ automatically inserts a tag when I type something like // don't and I hit the spacebar after the 't I see // don'< ></> with my cursor ready to type in the first tag. Does anyone know how to disable this behavior? I've tried google searching and searching through the settings with no avail. I'm using IntelliJ IDEA 13.0.1 community edition.
It sounds like a live template is being activated via the sequence tspace, although to the best of my knowledge this is not a default one. Go to File > Settings > [IDE Settings] > Live Templates. Search for a template that has t as its shortcut and inserts tags. Either delete it, or change its activation from space to tab (in the lower right). You may also want to check (and possibly change) the "default expand with" setting at the top.

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.

Rename using suggested var name with resharper

I'm Using resharper 6 nighty builds and VB.net. I've a big medium project with multiple files that don't follow the code style conventions of my company.
I've configured resharper with my own convenctions and It suggest to me the right name for each variable (perfect!).
But I can't find any automagic way to make the current name to be replaced with the suggested name.
Are there any way to do it? If not ... did you know ane fearure of coderush Xpress to achieve it?
Thanks.
If you've configured ReSharper with your naming conventions, then it should show a warning (blue squiggly underline) under any identifiers that don't comply. If you put the text cursor on one of those misnamed identifiers, you should see a pyramid icon appear near the left margin. Then you can press Alt+Enter (or click the pyramid icon) to drop down a quick-fix menu. There should be an option in the menu to "Rename to '_myField'". Usually it's the first item in the list, so you can just press Enter again to do the rename.
If you want to do this on everything in a source file, you can use the ReSharper > Inspect > Next Issue in File command (or its keyboard shortcut -- F12 in the IDEA keymap) to move the cursor to the next warning in the file. Then, if it's another name warning, you can use Alt+Enter, Enter again to fix it.
Unfortunately, there isn't a way to automatically fix every instance of a warning at once (though it's been requested; please feel free to vote for RSRP-126551 in their issue tracker).