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 - Firing of changes in BuildExecutionSupportImpl is badly designed.
Summary: Firing of changes in BuildExecutionSupportImpl is badly designed.
Status: NEW
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Stupka
Depends on:
Blocks: 256161
  Show dependency tree
Reported: 2015-11-04 15:09 UTC by Martin Entlicher
Modified: 2015-11-04 15:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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.