Bug 153888 - [Markers] Marker views update on each resource delta (was: Problems view flashes when launching anything)
Summary: [Markers] Marker views update on each resource delta (was: Problems view flas...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatbug, performance
Depends on:
Blocks:
 
Reported: 2006-08-15 07:20 EDT by Dani Megert CLA
Modified: 2007-06-06 15:27 EDT (History)
0 users

See Also:


Attachments
Proposed Fix (2.80 KB, patch)
2007-04-11 12:20 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2006-08-15 07:20:22 EDT
3.3 M1

Steps:
1. create a new Java project
2. import JUnit into it
   (http://www.eclipse.org/jdt/ui/smoke-test/junit3.8.1src.zip)
3. in the Package Explorer select 'MoneyTest.java'
4. (optional - makes it easier to see the problem) uncheck the preference
   Run/Debug > Console > [] Show when program writes to standard out
5. Run > Run As > Java Application
   ==> Problems view flashes
6. click on the Run tool bar button
   ==> Problems view flashes each time step 6 is repeated

NOTES:
1) there is no flashing if problem grouping is set to 'None'
2) there is no flashing if the following preference is unchecked:
   Run/Debug > Launching > [] Build (if required) before launching
Comment 1 Dani Megert CLA 2006-08-15 08:10:22 EDT
The problem isn't the launching but the build that is triggered by it i.e. the same problem appears each time if Ctrl+B is pressed with uncheck auto-build.

I verified that no markers are created, deleted or modified and hence the view should not do anything at all.

The Tasks view suffers from the same problem but it's not visible (like the in the Problems view in list mode).

I think the cause is the code in MarkerView's markerUpdateListener which does not check the resource delta for added/deleted/changed markers but simply starts a marker update job which has no access to the delta.
Comment 2 Dani Megert CLA 2006-08-29 06:29:09 EDT
Tod,

any update on this one? Same problem when adding or removing a breakpoint: the whole !!!Problems!!! view flashes even though a breakpoint has nothing to do with problems at all.

Same problem in R3.2.

If you have many errors and warnings and don't filter the Problems view it gets pretty annoying.
Comment 3 Tod Creasey CLA 2006-08-29 07:44:08 EDT
Not yet but I'll be looking at it in 3.3 - Boris has some good use cases too.
Comment 4 Tod Creasey CLA 2006-12-04 15:52:42 EST
Not clear that we will have time in 3.3.
Comment 5 Dani Megert CLA 2007-04-11 10:40:43 EDT
At least the simple check whether the delta has marker changes has to be added for 3.3.
Comment 6 Dani Megert CLA 2007-04-11 10:54:04 EDT
Patch will follow...
Comment 7 Dani Megert CLA 2007-04-11 12:20:30 EDT
Created attachment 63519 [details]
Proposed Fix

How many patches are needed to earn the commit rights for real? ;-)
Comment 8 Tod Creasey CLA 2007-04-11 13:03:49 EDT
We give commit rights if you want to own a piece of our code.... just let us know!
Comment 9 Tod Creasey CLA 2007-04-12 16:25:35 EDT
Thanks very much Dani - I tidied up an unnecessary local variable but I have otherwise unchanged this. Released for build >20070412
Comment 10 Tod Creasey CLA 2007-04-30 11:14:31 EDT
VERIFIED in I20070430-0010