Please give me solutions of this problem from my kotlin codes!
t.message has red warning
binding.root has red warning
I've tried to resolve this issue, but still have no success in addressing it.
replace it with val_binding
RecyclerView.ViewHolder(val_binding.root)
Related
I'm currently using Intellij Idea (v2020.2) to code and today I encountered this wild warning as shown below.
Is there any ideas to fix it? Thank you!
You need to change <Object> to <>. Diamond operator was introduced in Java 1.7
I have this kind of code:
get alcoholLink() {
return $('a=Alcohol');
}
which is valid webriverio selector for getting an element with text 'Alcohol'.
But IntelliJ IDEA underlines it red and displays "unexpected token" error.
Does anybody know how to tweak IntelliJ settings in order to recognize the code as valid webdriverio selector?
Thanks,
mismas
IDEA treats $ as jQuery and thus jQuery-CSS language is auto-injected in $() calls. And 'a=Alcohol' is not a valid CSS selector syntax - thus the error; deselecting the js: JQuery selectors language injection in Settings | Editor | Language Injections should help to get rid of the issue:
I'm using spring boot and thymeleaf in Intellij Idea and try to get the parameters of the URL in the template, I use the following code:
<!--/*#thymesVar id="param" type="java.util.Map<java.lang.String, java.lang.String>"*/-->
<a th:href="#{/dashboard(version=${param.version})}">Dashboard</a>
It works correctly, but I want to clear the error message, Is there any good way to do this?
This is not an error. If you run your application, It is supposed to work (If there is no other errors), as you mentioned that It's working correctly. The JetBrains/ IntelliJ is not able to locate your model variables with Thymeleaf framework. So that's why I does show the red underline. For more details check the link how to resolve JetBrains model variables.
Hopefully in next version of IntelliJ IDEA, this issue would get resolved.
Let us know If It was helpful.
The Quick Documentation popup for methods sometimes shows "Inferred annotations available" or "External annotations available", mostly regarding whether a parameter or a return value can be null.
I would rather not see these and only see the actual documentation for the method. Can that be done?
It can't be done right now, but a fix for this issue is scheduled for later this month in release 2017.3.3. (The current release is 2017.3.2.)
See IDEA-179266 Option to hide inferred annotations in Quick Documentation popup
~~~~~~~
Update:
I just noticed that the bugfix arose from another SO post on this issue. See Hide JetBrains annotation on popup JavaDoc in IntelliJ
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