Bug 537543 - Error markers missing on project explorer with hierarchical view
Summary: Error markers missing on project explorer with hierarchical view
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 major with 1 vote (vote)
Target Milestone: 4.9 M3   Edit
Assignee: Mickael Istria CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
: 538965 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-31 14:37 EDT by Michael Wyraz CLA
Modified: 2018-09-12 04:42 EDT (History)
5 users (show)

See Also:


Attachments
Screenshot (76.84 KB, image/png)
2018-07-31 14:37 EDT, Michael Wyraz CLA
no flags Details
Verified. Note the icon is different w.r.t. other markers on MacOs. (25.27 KB, image/png)
2018-08-02 15:20 EDT, Patrik Suzzi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Wyraz CLA 2018-07-31 14:37:45 EDT
Created attachment 275205 [details]
Screenshot

With photon, no error markers are shown at project level in the  "project explorer" with "Hierarchical" project presentation.

Steps to reproduce:
- Create a fresh workspace
- Switch to project explorer, switch view to "hierarchical"
- Create a java project
- Create a class
- type something in the class that produces an error, save the class

Result:
- error markers (little red cross at the folder icon) are shown up to the "src" folder but not at project level

Expected result:
- the project should be marked as "error"
Comment 1 Patrik Suzzi CLA 2018-07-31 18:29:42 EDT
I can reproduce the issue on MacOs with Eclipse SDK
Version: 4.9
Build id: I20180731-1305
OS: Mac OS X, v.10.13.3, x86_64 / cocoa
Java version: 1.8.0_144
Comment 2 Patrik Suzzi CLA 2018-07-31 18:33:34 EDT
@Mickael in c/c: IIRC, you contributed to the project explorer development. 

Can you recall if there is a specific reason for not showing an error marker on the top project when the project presentation is hierarchical?
Comment 3 Mickael Istria CLA 2018-08-01 03:58:20 EDT
I don't recall a specific reason for not showing it.
But one important thing to keep in mind when doing this development is that we need to have performant code, and there is a risk the calling `resource.findMarkers(..., IResource.DEPTH_INFINITE)` on all visible folders can be a very expensive approach so the naive implementation is probably not suitable (and I didn't have time for more consideration back then).
Comment 4 Mickael Istria CLA 2018-08-01 04:11:50 EDT
But this one is most likely a bug as the exepctation is that the hierarchical view would at least show the marker on the containing project.
Showing it on the whole upper hierarchy is more an enhancement, already tracked in bug 478117
Comment 5 Michael Wyraz CLA 2018-08-01 06:07:04 EDT
Mickael, I absolutely agree that "showing at project level" is an expectation and it's lack is a bug, while "showing at complete hierarchie" can be thread as a feature request (although I wonder why this would need to scan with infinite depth - if all components report markers from it's contents, each should need to scan it's directy children only).

I'm pretty sure that it worked on oxygene. The first time I saw it was shortly after migrating a workspace and I wondered why a (collapsed) project did not run but did not show the error mark.

Regards,
Michael.
Comment 6 Mickael Istria CLA 2018-08-01 13:04:53 EDT
I can reproduce it, and I agree with you it used to work in Oxygen. I fail at understanding the actual reason why this changed, but I'm working on a patch that fixes it.
Comment 7 Eclipse Genie CLA 2018-08-01 13:07:13 EDT
New Gerrit change created: https://git.eclipse.org/r/126908
Comment 9 Mickael Istria CLA 2018-08-02 06:59:59 EDT
A patch fixing it was merged.
Please try a build from http://download.eclipse.org/eclipse/downloads/drops4/ later today (so it should contain the fix) and report whether it fixes it for you too.
Comment 10 Patrik Suzzi CLA 2018-08-02 15:20:51 EDT
Created attachment 275246 [details]
Verified. Note the icon is different w.r.t. other markers on MacOs.
Comment 11 Mickael Istria CLA 2018-08-02 16:12:41 EDT
(In reply to Patrik Suzzi from comment #10)
> Verified. Note the icon is different w.r.t. other markers on MacOs.

Interesting. I think it could be a bug. Can you please open a new ticket?
Comment 12 Patrik Suzzi CLA 2018-08-04 05:27:59 EDT
Added bug 537686
Comment 13 Kalyan Prasad Tatavarthi CLA 2018-09-12 04:42:59 EDT
*** Bug 538965 has been marked as a duplicate of this bug. ***