How Is The New Problems View Supposed To Work?
I created a project over existing sources, then ticked Make project automatically in the compiler opions.
After rebuilding the project I get errors but they aren't displayed in the problems view (see attached).
What should I expect to see in this Problems view?
Attachment(s):
problems.png
Please sign in to leave a comment.
Hi.
Rebuild issue is probably this one: http://youtrack.jetbrains.com/issue/IDEA-94395
Recently fixed.
Regards,
Alexander.
Yes, Alexander is right, this is the view update issue, that has been fixed already.
The view is supposed to show all compiler errors from the recent compilation. The view is updated according to compilation scope after every compile session launched either explicitly or implicitly (automake).
If you choose "eclipse compiler" instead of "javac" in compiler settings and check the "proceedOnError" option, the view will effectively show all recent compilation errors across the whole project.
Best regards,
Eugene.
It still doesn't work as expected (i.e the same as the eclipse problems view!).
If I change the method signature so the type of one of the parameters is "Foo", the Problems View updates with
java:Foo cannot be resolved to a type.
This is also the output of Make Project.
However, if I run Rebuild Project I also get other classes saying:
java: The method doSomethingAwesome(Foo) from the type my.package.Data refers to the missing type Foo
If I revert those changes it takes about 30 seconds to recompile and update the problems view but eclipse updates it almost immediately.
Now if I change the method signature so the type of one of the parameters is "StringTokenizer", the Problems View updates with
java: The method equalsIgnoreCase() is undefined for the type java.util.StringTokenizer
Again it doesn't update the dependent classes.
It should say:
java: The method doSomethingAwesome(java.util.StringTokenizer) in the type my.package.Data is not applicable for the arguments (java.util.String)
So my too suggestions are:
1) Update the problems view when inspections are updated with errors since the inspections analysis of a class is much quicker than the background compile
2) Update the problems view with errors in dependent classes
> 1) Update the problems view when inspections are updated with errors since the inspections analysis of a class is much quicker than the background compile
This is the point of problems view: it suggests only the errors from compiler. We decided not to mix those errors as they come from different sources. Some errors that compiler outputs, for example, are not highlighted by on-the fly analysis
> 2) Update the problems view with errors in dependent classes
What you see there are errors produced by compiler. I'm not sure ahat you mean by showing errors in dependent classes, because make founds dependent classes for recompilation and also tries to compile them. Probably you are talking about "not complele" error list because compiler stops compilation after some number of errors. This is the feature of compiler and you cannot achieve this result with javac. However, you can choose eclipse compiler in Settings | Compiler | Java and select "proceed on error" option.
Eugene.
I sometime run Analyze - Inspect Code to get a list of problems but it takes such a long time it puts me off using it and of course it doesn't update after being run.
Is there any way to make the problems view show Warnings as well as Errors?
Or make it the result of Inspections that regularly updates?
As it is at the moment I don't find much use in the IDEA Problems view at all unfortunately, whereas the eclipse Problems View is functionally very useful.
I have just done a big search replace which has left me missing some imports.
I am using the eclipse compile and have proceed on Error Ticked.
The eclipse problems view shows 42 errors but IDEA only shows 2.
IDEA is showing at a class level but eclipse is still showing over 20 classes with errors.
What is more confusing is that the of Make is:
The Problems View is supposed to contain results of automatic makes. Because such makes are run continuously in background, this is the only way to view the results of their invocation. If you have automakes disabled, the view is indeed useless. The best effect from the view is when the automake is on, your project compiler is set to eclipse and "processOnError" compiler option is on. This is because eclipse compiler, unlike javac, can continue compilation even if some sources contain errors. This way the view will contain all errors that compiler was able to find. It is also possible to use javac instead of eclipse compiler, but in this case the ProblemsView will contain only some errors found by javac untill the moment it stopped the compilation.
Showing warnings is possible, but we thought originally that this will only pollute the view. If you think warnings are also important, please create the issue in youtrack.
That explains things somewhat.
Having warnings is quite useful too if you are tidying up your project.
The output of Make has a "Hide warnings" option so something similar could be applied.
I'd like to be able to group warnings by type too and not just by class.
e.g. so I can see how many References to generic type java.util.Vector<E> should be parameterized I have.
Being able to apply the quick fixes (if any) from this window would be good too.
Message was edited by: opticyclic Mistook the Problems scope for the Problems view initially.
The problem with the dependent classes seems to be that dependent class hasn't changed so it doesn't get recompiled.
If I add white space to the file it gets recompiled in the background and the error appears in the view.
The problem is that I don't know what the dependent classes are.
eclipse immediately update the Problems View with errors in all the dependent classes.