In IDEA 2016.2, when you suppress an inspection for a statement, the generated comment looks like this:
//noinspection InspectionName
It annoys me that there's no space before noinspection. Can this template be changed?
No, this comment text is built programmatically and cannot be changed by the user.
Related
Here is the comment style that I want to create but I don't know how.
I was looking the whole net and intellij but I can't find the solution how to create comments like this. Does anybody know how to do comments like this?
It's a rendered view for common comments: https://www.jetbrains.com/help/idea/working-with-code-documentation.html#toggle-rendered-view
What do I need to do to get Intellij to display the new edited version of my documentation when I view it (using Ctrl+Q).
For example if I create a new class the default template is added and the documentataion looks like this:
And then will display like this:
If I then edit this to this:
It still displays as the original documentaion (2nd image).
I don't think you have anything to do to have the "updated" javadoc displayed.
It is working as expecting for me, and it has been like that for years...
I figured it out. I had the documentation open previously, but pinned to the right hand side. Like below:
This meant that when I edited and tried to view it again it would display the old doc version which was pinned.
If I close that pinned window then the updated doc is displayed every time.
I'm using IntelliJ IDEA v12. When I import a project, there’s a strikeout/strikethrough line on the method which has the annotation #Deprecated, but I used alt+enter to disable it. So, how can I reactivate this feature? I want to display that strikethrough, thanks!
Open Settings -> Type Inspections to go to inspection settings -> Type Deprecated to find out all deprecated related inspection settings -> Check Deprecated API usage.
IntelliJ had a bug in 2018.3, 2018.2.2 (182.4129.33). It was fixed in builds 191.65, 183.3691.
Setting -Dide.text.effect.new.metrics=false in the .vmoptions fixes the problem.
In addition to Ionghua's answer .....
If you find that IntelliJ is still not striking out deprecated methods, even though you have enabled the inspection as above, check to make sure that your code is not ignoring deprecation warnings with #SuppressWarnings("deprecation").
In addition to longhua's answer... and vegemite4me...
Another possible source for this problem might be custom color themes.
If you are using a custom theme, make sure that it contains strikethrough. I was using monokai-sublime and there is no strikethrough for #Deprecated annotations. When I changed the color theme from monokai to darcula strikethrough worked as expected.
I found that the only thing that worked for me with version 2019.2 192.5728.98, runtime 11.0.3+12-b304.10 was to use Help | Edit VM Options and add -Dide.text.effect.new.metrics=false
Is it possible to wrap long comment lines in IntelliJ in javascript files? I have turned on line wrapping as shown in the settings below, but when I do a code reformat, it doesn't wrap the line.
It's not supported yet on code reformatting, added a new feature request, please vote.
I'm using IntelliJ 14 on a Mac, which has a Fill Paragraph command. Access it via the awesome universal Command-Shift-A action search feature. Works like a charm!
I use the Dojo framework, which I load from an url.
How should I deal with the 'dojo' was used before it was defined errors, and the alike?
Yes, my feeling really get hurt, when running code through JSlint.
Perhaps you can put something like
/* globals dojo */
in the beggining of your file to tell JSLint that dojo exists?
I personaly use JSHint (a fork of JSLint that is less nitpicky) instead and one of the preconfigured options is support for Dojo.
Sounds like you need to put Dojo first in your JavaScript. The message suggests that you have an ordering problem.
Don't take it personally. You are not your code. Just make it better, learn something, and don't do it again.
If you scroll all the way down to the bottom there is a "predefined" textbox. Simply put in any of the variables you need into there (comma separated).