Problems View - Update of Line numbers on file changes [message #1754035] |
Mon, 13 February 2017 23:56  |
Eclipse User |
|
|
|
Hi,
I would like to know the behaviour (JDT source code level) of Problems View update feature on changes in File and Ctrl+s is clicked.
To restate my problem, I describe the full scenario:
1) I click on a file in Project Explorer, my editor is opened.
2) The error markers appear correctly on the vertical bars.
3) I click in the Problems view on some problem (let's call it P1).
4) My editor jumps to the right line for P1 (highlighted, ...).
5) I edit the file before the P1 error marker by inserting a few new
lines.
6) The P1 error marker on the vertical bar is shifted down
correctly, but the Problems view is not updated with the shifted line for P1 until SAVE (CTRL+S) is clicked.
Can you explain the logic behind this behaviour. If possible, provide the Java classes in org.eclipse.ui.ide which handles this behaviour.
Regards
Sam
|
|
|
Re: Problems View - Update of Line numbers on file changes [message #1754080 is a reply to message #1754035] |
Tue, 14 February 2017 07:22  |
Eclipse User |
|
|
|
In our lingo, entries in the Problems view are created by a "builder" that works on persistent state of files in the workspace (IResource). This is a general platform mechanism, the JDT specific part can be found in and around org.eclipse.jdt.internal.core.builder.JavaBuilder.
Markers in the vertical bar are updated by the "reconciler" which operates on working copies that reflect the possibly unsaved state of text in an editor. The central class for this is org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation, relying on CompilationUnitProblemFinder for the compiler work and collecting results in JavaElementDeltaBuilder etc.
|
|
|
Powered by
FUDForum. Page generated in 0.04308 seconds