Rider not showing "Check expression for null" in contextual popup - intellij-idea

I'm starting with rider and just started doing some of the built-in introductory tutorials.
Just at the beginning (I think it is third step) of the essentials tutorial I am instructed to do this (Can be read on the right) but no option is shown in the contextual popup realted to Checking expression to null.
Must I do anything special for this option to show?

The solution wasn't loaded correctly. The red exclamation mark in the right upper corner of the editor sais that solution analysis also has errors. In addition, we see lots of red code in the editor. It seems to be the reason for the corresponding action absence. Most likely, it means that you have incorrect MSBuld in Rider settings "File | Settings | Build, Execution, Deployment | Toolset and Build." Please, check your MSBuild settings.
https://www.jetbrains.com/help/rider/Settings_Toolset_and_Build.html
If it does not help, please submit a support request (https://rider-support.jetbrains.com/.) with attached logs (https://rider-support.jetbrains.com/hc/en-us/articles/360001079770-How-to-collect-Rider-logs-)

Related

Intellij documentation pop up does not work properly

Despite that I have ticked the "auto-display documentation" and tried inputting different numbers in "ms" box - I still have to press CTRL+Q to see the documentation. How to make it work?
Also if I click CTRL+Q to show documentation pop up manually - the pop up is too small. Can I make it bigger by default to contain all the text?
IntelliJ IDEA 2018.1 (Ultimate Edition) Build #UI-181.4203.550
Linux Mint 18.3 Sylvia, Cinnamon 64-bit
Sounds like you want this setting:
Settings > Editor > General
> Show quick documentation on mouse move
And to make the documentation pop-up text larger:
Click the gear icon in the top-right corner of the pop-up, there is a setting there.
It seems there is a bug. If you open the settings via the gear icon and tick the show toolbar it will work again (at least I was able to reproduce it and this fixed it for me).
I don't have issues with the size (I'm on mac) using IntelliJ IDEA 2018.1.2 (Ultimate Edition) Build #IU-181.4668.14.
You can create an issue on their issue tracker here: https://youtrack.jetbrains.com/issues/IDEA.
For more info about reporting issues, see: https://www.jetbrains.com/help/idea/reporting-issues.html
Update for IntelliJ 2018.2:
The code completion in IntelliJ IDEA continues to evolve, and now the IDE shows both all the possible auto-completions and Javadoc, at the same time (without the need to directly invoke Javadoc each time). Please be aware that you need to actually enable this cool new feature. Go to Preferences | Editor | General | Code Completion and turn on the Show the documentation info pop-up in… options.
(more info here: https://blog.jetbrains.com/idea/2018/05/intellij-idea-2018-2-early-access-program-is-open)

List of all errors in project in CLion

CLion 2016.2 helpfully detects potential errors in the file you're editing, which can be seen in the validation bar to the right of the code.
That's just a single file though, is there a way (like a tool window) to get a list of all such warnings in the whole project, or specific parts of it?
Bonus points if it also lists warnings and errors from the compiler, though that's less important, because the compiler output already includes any it found.
Yes, it is possible. The feature you are looking for is called the Inspector.
Do: Find Action... | Inspect Code. It will show a pop-up that will allow you to select the scope: file, whole project, custom, and the Inspection profile (you can choose the type of errors you want to see):
After clicking OK, this is an example of the output, that you can navigate with the mouse or with keyboard shortcuts:
In version 2017.2, I have it under Code | Inspect Code....
You can also right click a folder in Project view and select Inspect Code... there to be able to check only that folder.

How to customize appearance of "TODO" in Intellij IDEA?

I am using Intellij IDEA 15.03 on a Mac. One of the first things I do after installing Intellij on a new machine is customize the appearance of the code. This question, in particular, is about the customization of the TODO defaults.
In Editor > Color & Fonts > General, I have the following setting:
This definition, along with some other customizations, is saved under a separate Scheme, say S.
Additionally, under Editor > Inspections, the settings are as shown below:
In my code, however, the white-on-red look that I set up is not showing up, and every TODO comment is simply shown as a warning with the standard yellowed background. The severity setting seems to be overwriting my scheme setting. How do I get the setting shown in the first picture here?
Here is a sample from my code, as is being currently displayed by Intellij IDEA:
You can get the highlighting you want by disabling the "TODO Comment" inspection. The inspection is disabled by default, so you must have enabled it yourself.
As the description shown on your screenshot says, the inspection is intended to be used in batch mode (when you run Analyze | Inspect Code manually), and not for on-the-fly editor highlighting.

IntelliJ - show where errors are

Is there a way to make IntelliJ mark error locations continuously for the files you are working on in the similar manner as Eclipse does? At the moment I need to make the project which lists all the errors in the message panel, but even then I cannot navigate to them using the editor panel. I would like to have simple dots/markers which would point to error/warning locations.
IntelliJ IDEA detects errors and warnings in the current file on the fly (unless Power Save Mode is activated in the File menu).
Errors in other files and in the project view will be shown after Build | Make and listed in the Messages tool window.
For Bazel users: Project errors will show on Bazel Problems tool window after running Compile Project (Ctrl/Cmd+F9)
To navigate between errors use Navigate | Next Highlighted Error (F2) / Previous Highlighted Error (Shift+F2).
Error Stripe Mark color can be changed here:
For those who even yet have the problem, try enabling "Build project automatically" in the Java compiler settings and see if that makes a difference as it worked for me.
I ran into the problem of not having set my sources root folder (project window--right click folder, mark directory as > sources root). If you don't set this IDEA doesn't parse the file.
For IntelliJ 2017:
Use "Problem" tool window to see all errors.
This window appears in bottom/side tabs when you enable "automatic" build/make as mentioned by #pavan above (https://stackoverflow.com/a/45556424/828062).
To access this Problems panel, you must set your project to build automatically. Check the box for Preferences/Settings > Build, Execution, Deployment > Compiler > Build project automatically.
Frankly the errors are really hard to see, especially if only one character is "underwaved" in a sea of Java code. I used the instructions above to make the background an orangey-red color and things are much more obvious.
In IntelliJ Idea 2019 you can find scope "Problems" under the "Project" view. Default scope is "Project".
Besides, you can choose going to next error only (ignore warning) by:
Right click the Validation Side Bar.
On the context menu, choose the Go to high priority problems only
it works for Intellij Idea 12
In my case, I unknowingly unchecked 'Error Stripe Mark' option (Idea 2018.2: Settings > Editor > Color Scheme > General and expand `Error and Warnings' & click 'Error').
Fix is to check 'Error Stripe Mark' option of 'Error' (as highlighted in the below image). Now you will see the error marks in scrollbar area.
In my case, IntelliJ was simply in power safe mode
Do you have a yellow icon like this [_] at the bottom of the main window?
It is a "type-aware highlighting" switch which could be disabled accidentally.
You should re-enable it by clicking on the icon.
In the intellij hit ctrl+alt+shift+s and go to global libraries and click on plus icon to add the java libraries this will solve your problem. now you will see the errors coming up
enter image description here
This is the solution I found:
Open IntelliJ Setting (Crtl + Shift + A);
Click in "Editor";
Click in "Color Scheme" + the Programming Language (inside "Color Scheme");
Select "Analysis Error";
Select "Error stripe mark" + Add the Color desired

Disable IntelliJ Warnings

It really annoys me that IntelliJ highlights certain 'errors' (that don't prevent successful compilation) the same way that real errors are highlighted. For example, a magic number is not really an error, but it will be flagged in exactly the same way as an incompatible type error.
How can I change this?
Go to Settings -> Inspections. Then you need to search through the long list for the offending inspection, which you can get the name of by hovering on the warning marker in the margin. You can change the severity of the inspection, whether it's an error, warning, etc. or just disable it altogether.
Edit: if you search for "magic" in Settings, you get the following, which should be helpful:
Whenever you see an inspection warning/error you can place the caret on it and press Alt+Enter (a light bulb also appears that tells you that). A menu will appear with suggested quick fixes. You may need to open a submenu by pressing Right, and you'll find "Edit inspection settings" there. Having invoked that, you may proceed as in hvgotcodes's answer :), it's just a faster way of getting to those settings.
As Michael Calvin said you can use the SuppressWarnings annotation. For example:
#SuppressWarnings("OptionalUsedAsFieldOrParameterType")
See https://github.com/JetBrains/intellij-community/blob/master/plugins/InspectionGadgets/src/inspectionDescriptions/OptionalUsedAsFieldOrParameterType.html
Usually searching the internet for the exact description leads me to this.
Not directly relevant to the OP, but may be of use to future Googlers
I got to this question while trying to figure out how to disable IntelliJ IDEA's warnings about Guava functionalities that have been replaced by Java 8 features. I'm not able to use the Java 8 versions of these features in my case because of a library we're using that was built with Guava (despite being a Java 8 project). So to solve that, I added a SuppressWarnings annotation before any class using Guava:
#SuppressWarnings(Guava)
public final class...