Prevent IntelliJ from marking errors for specific file extensions - java

IntelliJ has been indicating errors in a README.md file, how can I disable error checking for specific files or even specific file formats?

This is a bug in IntelliJ IDEA:
IDEA-220938 False positive class or interface for Java in Markdown
For the time being, you can disable error checking in code fences:

Related

I'm setting up java on vs code and (1) problem keeps popping up even if the code is running and a small line below the p in public class

enter image description here
I cant figure out what I am doing wrong?
The comment under the issue Warning: Classpath is incomplete. Only syntax errors will be reported. gave the explanation:
This warning is displayed when you open a single java file, because at
that point, no classpath can be configured thus no information on
types other than the default JDK can be provided. In that case, only
syntax errors are reported.
Open Command Palette and choose Java: Create Java Project, then code in your new project, there won't be this kind of errors.

Importing a project into Eclipse and deploy it in your local

I have a project in Accurev for which I created a workspace. I did File > Import > Existing Projects into Workspace. After the import, the first thing that I have done is Configure Build path (Project>properties>Java Build Path). Still, I can find a lot of errors. I'm new to Java and I'm searching the Java errors in google and fixing them. Please suggest, How can I solve the similar errors for multiple files.
For Example,
The Empty block should be documented (I have it in 3 files)
The parameter customerExpression should not be assigned ( Multiple files )
The import java.util.List is never used ( Multiple files ). There are some other imports which were used inside the company are never used.
Apart from Java Problems, I do have
Classpath Dependency Validator Message
EJB Validator Message
HTML, JSP Problems etc which I feel can be solved once I solve Java Problems. I was told that Java problems are important. COrrect me if I'm wrong.
Please suggest.
Thanks
Like #Carlos Heuberger said these are seems like warnings not errors they won't cause any problem for your project to run. People usually don't care that much of warnings.
If you want to get rid of those warnings eclipse have quick fix actions for some of them. To do that head one of the warnings and right click then select quick fix. This should pop out a screen which summarize the action that eclipse will take.
Or you can simply hide them.
If you want to hide all the validation warnings go Window>Preferences>Validation then click Disable All button. This will disable all validation messages in your workspace.
For java warnings go through Windows>Preferences>Java>Compiler>Errors/Warnings and change the warning options according to your preferences. In my workspace under the Code Style section Undocumented empty block is setted to ignore so i don't get that warning in my workspace unlike yours.
Hope that helps.

Why is Visual Studio trying to use the wrong JDK version?

I am trying to build WeatherApp, which comes from this tutorial, but I am seeing this error:
The specified task executable location "C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javac.exe" is invalid.
and this warning (not sure if they are related):
Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
I can doube-click the warning to make it go away, but the error remains. I am not sure why the project is trying to use that version of the jdk, as I have changed my xamarin optioins to point at Program Files instead:
Why is Visual Studio trying to use that versioin of the JDK?
Sometimes there's a sdk.caches file that will hold an old reference. Please try to delete both your obj/bin folders and see if that resolves the issue. If it doesn't, turn up your Build Output verbosity and attach a Build Output Log to your post:
https://forums.xamarin.com/discussion/27515/how-to-obtain-diagnostic-build-logs (XS)
http://blogs.msdn.com/b/msbuild/archive/2005/09/29/475157.aspx (VS)

Eclipse creating "Javadoc: [identifier] cannot be resolved or is not a field" warnings unnecessarily

Eclipse seems to be generating a lot of these unnecessary warnings about JavaDoc in my code, and I can't seem to be able to get rid of the warnings.
First of all, the warnings don't make sense. These appear in links, like:
/**
* {#link Foo#bar}
*/
Where Foo.bar definitely exists. Eclipse can find it via right click > open declaration. The field is protected.
At first, I thought it was because Foo inherits from another class, which is where bar actually belongs, but changing the link to the super class doesn't remove the warning.
All the warnings are for the same field. I've tried accessing it in different ways (including Foo#bar, SuperClass#bar, #bar, and the fully qualified name).
I used to have enabled JavaDoc warnings in Java > Compiler > Javadoc, but have since disabled them. The project settings are also disabled.
The code base is using Java 8, which changed how Javadoc warnings and errors work, so it may be related to this (the JavaDoc can't be created by Eclipse because of errors in the Javadoc, presumably caused by Java 8, but we only use Eclipse's JavaDoc on hover, anyway).
I have two pieces of additional software installed in Eclipse: m2e v1.5 and CodePro v7.1.
mvn compile has no warnings, so I'm pretty sure that this is an Eclipse issue. Using Eclipse 4.4. I've tried restarting and rebuilding the project several times.
The warnings only show up in the problems view if I choose Show > Show all. Ticking all the individual "show options" does not display these warnings. They're still displayed in the editor, though.
It turns out this was a problem with the AJDT, which I had recently removed. The AJDT (at least the dev version for Eclipse 4.4 as of 2014-07-19) does not uninstall cleanly. As a result, the program wasn't building correctly (and in fact, errors could not be detected).
The fix is here. The issue was that the AJDT left a buildCommand and nature in the .project file, which should have been changed back to org.eclipse.jdt.core.javabuilder and org.eclipse.jdt.core.javanature, respectfully.

Eclipse. Copied code is hard to read. How to disable warnings and delete comments?

That is it, I'm tired of that problem: I have some source of java code it could be a manual or web-site or whatever but the format of this source often is not suitable for reading, so I copy it to a temp file in Eclipse and press Ctrl+Shift+F(Auto formatting), it's good so far but what next? My code looks like Christmas tree there are a lot of warnings about mistakes (mostly because this code is out of it's context) but I don't care I just need to read it
1) How I can disable all warnings? I need just be able to read and understand the code not to run it.
2) Is there a way to delete all comments and I don't mean folding them?
Turn off your lint markers in eclipse. This will avoid warnings
Explore through this path location:
You can configure the Java Compiler to ignore the Deprecated Warnings. I'd suggest to configure this setting for the specific project, not globally. To do so, right-click on your project and go to Properties > Java Compiler > Errors/Warnings.

Categories