This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256362

Summary: Firing of changes in BuildExecutionSupportImpl is badly designed.
Product: projects Reporter: Martin Entlicher <mentlicher>
Component: Generic InfrastructureAssignee: Tomas Stupka <tstupka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 256161    

Description Martin Entlicher 2015-11-04 15:09:42 UTC
I use BuildExecutionSupport to add change listener on it and when a change is fired, I ask getLastFinishedItem(), since there is no other way to find our what has happened.

However, a change event is fired by BuildExecutionSupportImpl from two places.
From registerRunningItem() and from registerFinishedItem().

registerRunningItem() does nothing with 'lastFinishedItem' field, therefore a call to getLastFinishedItem() returns the item that has no relation to the current change.

From the event it's not possible to find out if a new running item was registered, or if a finished item was registered.

Either, there should be no change event fired when a running item is registered, because I can not imagine what I would do based on an info that something has changed, but I have no way to find out what has changed, or I should have a way to distinguish registry of running and finished items.