Rider C# - Disable "Thread" on the side of the current debug line - rider

I am debugging an application and I want to disable the string with # circled in red in the following image:
Can I do that?

If you simply want to disable the inline view of values, you can do that by going to Settings > Build, Execution, Deployment > Debugger > Data Views and disabling the Show values inline option.
If, however, you want to just remove that value in specific, I don't believe there is a way to do that currently.
Instead, you can use the [DebuggerDisplay] attribute to specify how you want a class of field to be displayed: Microsoft Docs, or use DebuggerBrowsable(DebuggerBrowsableState.Never) to have it not be displayed at all. Note that these attributes affect the variables pane as well, not just the inline view.

Related

Intellij refactoring, disable/customize generating "#org.jetbrains.annotations.NotNull"

Every time I extract method, this line is generated "for me":
#org.jetbrains.annotations.NotNull
around the method. 1. I don't have this on my class path, so it does not compile 2. even if I have, I don't want to include jetbrains annotations in my project. Even if I have more suitable (maybe) javax.validation.constraints.NotNull annotation on class path, intellij does not use that one.
questions:
how to turn it off entirely?
how to customize, which annotation to use?
The extract method dialog has a Generate annotations check box. When disabled it does not generate the nullability annotations. The state of this check box is remembered between invocations, so disabling it once is enough.
If this check box does not appear, annotations for the extracted method should not be generated.
It is possible to customize the annotation used in the settings of the Java | Probable bugs | Constant conditions & exceptions inspection. The configuration dialog looks this:
Use the check mark button, to mark the selected annotation as the one that should be used for code generation.
I ran into the same problem and was able to fix it by follow these steps :
Go to Settings > Editor > Inspections >
Find Java > Probable Bugs > Nullability Problems > #NotNull/#Nullable Problems
Click Configure Annotations button and check these items

IntelliJ Plugin Development: LookupElement with class preview

For a custom language I created a CompletionContributor. Everything works fine. But I'm limited to the information I can display (only in the list or the bottom "advertisement" and only 1 line).
When trying to auto-complete on a java class name it will display more information on the selected line in a small side window. I would like to exploit that mechanism but I really don't know how it is done.
When looking at the options provided, I can use a custom LookupElementRenderer but there is no method in LookupElementPresentation related to the right window.
Any idea how it is done?
Are you referring to documentation popup which may be displayed if the corresponding setting (Setting->Editor->General->Code completion->Show the documentation popup in) is turned on?
If you want the feature to work for your language you have to use lang.documentationProvider extension point.

VS Code Intellisense don't suggest snippet at first

I want to use code snippets in VSCode. But when I type, for example, for in javascript file, the Intellisense doesn't suggest snippet "for-loop" - I need to manually scroll the dropdown and select it. Is there any way to make VSCode to suggest snippets at first? Thank you!
UPD: I have found the person with same problem, but he has no answers - link
You need to use editor.snippetSuggestions config option with "top" value. Please, see Customizing IntelliSense article for more tips and tricks.
There is one more way to deal with this issue by setting
"editor.tabCompletion": true,
that way whenever there is a snnipet available it will use it automatically without even opening the list by using tab twice.
File > Preferences > Settings (Code > Preferences > Settings on Mac)
open "Editor" menu on the left
edit "editor.tabCompletion": true
more info: https://code.visualstudio.com/docs/editor/intellisense#_customizing-intellisense
Now that VS Code mostly abstracted away the settings.json file, you can do the instructions shown by Kavu, with this bonus tip:
go to Preferences > Settings
find the Search settings text input, at the top
type in "snippet"
The setting should be at the top of the result set:
Setting editor.snippetSuggestions to top only works for certain snippets: for but not foreach. With top, the snippet does appear higher in the completion list, but for some reason the keyword version is what is highlighted, with the snippet option scrolled out of view (and the scrollbar quickly fades, giving the impression there's nothing hidden)
The editor.tabCompletion to true approach works for both for and foreach.

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.

Is there a way in Intellij IDEA to see the name of the method the current line belongs to?

In our code base there are a few very long methods (several pages worth of code). When reading the code, it would sometimes be good to be able to see the name of the method the current line belongs to, without paging up to the beginning of the method. Is this possible in Intellij IDEA? I am using Intellij IDEA 7.0.3.
You can use View | Context Info (Alt+Q, Ctrl+Shift+Q on Macs). It will display a pop-up on the top of the editor with the current context information (class/method signature).
IntelliJ 2018
This is shown by default at the bottom.
Unfortunately, the method is shown only by name (not including the parameters). If a method is overloaded you won't know for sure where you are.
If you want to move it from bottom to top, go to File > Settings... > Editor > General > Breadcrumbs > check Top:
In the structure panel select the "Autoscroll from source" option.
This way when you place the cursor inside any method the structure panel will show which method you're in.
Intellij now has support for breadcrumbs. Go to settings > appearance and tick "Show breadcrumbs". In this way you can view class/method name without Alt+Q.
For some reason (Alt-Q) wasn't consistent in Android Studio for me. I find (Ctrl-F12) to be pretty satisfactory for this purpose (Navigate|File Structure) though it can be a little laggy in larger files. And by pressing the hotkey again it will populate the list with all the inherited methods as well.