History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-5336
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Jemerov
Reporter: Igor Karpov
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Project-wide error highlighting

Created: 18 Oct 07 17:44   Updated: 22 Oct 08 08:41
Component/s: Editor. Error Highlighting
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,361


 Description  « Hide
The logic behind project-wide error highlighting is not very clear.
(by project-wide error highlighting I mean, that if some class has error and underwaved with red, all packages and the module are underwaved with red)

Supposedly, this highlighting should be up-to date, but it is not... Let's say, If I have code in module A that references code in module B, and there is no dependency configured A->B, then appropriate classes in A are underwaved with red (should be). But they become underwaved only when I open these classes in editor. It seems that this kind of error checking starts only when I open a file in editor.

This can lead to following problems: Find usages for code in B may not return usages in A (no dependency configured). Refectoring code in B does not update code in A for the same reason ,resulting in broken code.

Ideally, this kind of global error highlighting should be always up-to-date, so that I don't have to open the file in editor.
This may be a time-consuming process, so it can run as a background task.
If it is not practical for some reason, it would be fine to have this feature as inspection, started manually: "Inspect all classes and apply global error highlighting" - it is better to wait a bit than do wrong refactoring. (Or perhaps this kind of feature / inspection exists already? Or this is already reported as a bug?)

(Too bad I remembered about this when 7.0 is out already, this is actually bugging me all the time)



 All   Comments   Work Log   Change History      Sort Order:
Dmitry Jemerov - 18 Oct 07 18:27
This feature exists already, and it's called Make. When you compile the project, all files containing compile errors are highlighted in the project view, and then re-analyzed in the background to check if the user's changes have fixed the errors.

Igor Karpov - 19 Oct 07 12:05
Well.. I see.. our project unfortunately cannot be build with Make, it has its own set of build files. So I cannot use it..
As Idea is able to do some static checks without compiling everything, is it possible just to apply these checks recursively for all projects?

Jonas Kvarnstrom - 19 Oct 07 15:04

I wasn't aware of this, but unless something has changed radically and
rather recently, I think that all files that javac actually
compiled and that had compilation errors are highlighted – or am I wrong?

I sometimes have to introduce changes that temporarily break quite a lot
of files because there is no predefined refactoring that will do
everything in a single step (and I don't expect there to be such a
refactoring; you simply can't cover every potential change a
programmer might want to make in a single step).

In some of these cases, javac aborts before showing all potential
compilation errors. It may (for example) show a certain type of error
occurring in a few files but then skip compiling the rest of the files.
I'm not sure whether this is a result of how javac works or how the
"make" process in IDEA works when it comes to handling dependent
classes, but the end result is that I have to compile, fix errors,
compile, fix errors, compile, fix errors, and so on.

If IDEA had the ability to do true project-wide error highlighting, then
this behaviour of "make" would not be a problem; I'd be able to see all
syntax errors in the source tree and perhaps there could be a way of
stepping to the "next error" even if this error was in a different file.
But as it works now, I have no choice but to either go through the
compile/fix cycle a lot of times or manually traverse all source files.


Igor Karpov - 23 Oct 07 17:52
If it's hard to highlight everything in real-time, I would be fine with reasonably delayed highlighting (done by some background process), or with manually invoked inspection. I cannot use Idea 'make'

Dmitry Jemerov - 23 Oct 07 18:59
How large is your project? Such an inspection will work for a very long time on a reasonable size project.

Jonas Kvarnstrom - 22 Oct 08 08:41

I wasn't aware of this, but unless something has changed radically and
rather recently, I think that all files that javac actually
compiled and that had compilation errors are highlighted – or am I wrong?

I sometimes have to introduce changes that temporarily break quite a lot
of files because there is no predefined refactoring that will do
everything in a single step (and I don't expect there to be such a
refactoring; you simply can't cover every potential change a
programmer might want to make in a single step).

In some of these cases, javac aborts before showing all potential
compilation errors. It may (for example) show a certain type of error
occurring in a few files but then skip compiling the rest of the files.
I'm not sure whether this is a result of how javac works or how the
"make" process in IDEA works when it comes to handling dependent
classes, but the end result is that I have to compile, fix errors,
compile, fix errors, compile, fix errors, and so on.

If IDEA had the ability to do true project-wide error highlighting, then
this behaviour of "make" would not be a problem; I'd be able to see all
syntax errors in the source tree and perhaps there could be a way of
stepping to the "next error" even if this error was in a different file.
But as it works now, I have no choice but to either go through the
compile/fix cycle a lot of times or manually traverse all source files.