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 132275 - SS: CND should listen to executionFinished so a custom tool can dismiss progressbar
Summary: SS: CND should listen to executionFinished so a custom tool can dismiss progr...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-08 02:22 UTC by Thomas Preisler
Modified: 2008-04-09 14:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2008-04-08 02:22:47 UTC
From SS / NB 6.1 testing:

5)? Push 'Advanced|Advanced Profiling|Start' menu item
 ==> Progress bar cannot finish

7) is relative to 5). For debugger, RTC, Thread Analyser progress bar in the right bottom corner does not disappear after finishing operation and "Exit IDE" 
window, containing these processes, appears while closing IDE. 

DefaultProjectActionHandler is not listening to CustomProjectAction so finished() is never processed.
Comment 1 Thomas Preisler 2008-04-08 02:47:11 UTC
Fixed in trunk:

changeset 0a9301f2df93 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=0a9301f2df93
description:
	132275 SS: progress bar is not finished

diffs (14 lines):

diff -r 5ac0847de03d -r 0a9301f2df93 cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/DefaultProjectActionHandler.java
--- a/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/DefaultProjectActionHandler.java	Mon Apr 07 18:28:05 2008 -0700
+++ b/cnd.makeproject/src/org/netbeans/modules/cnd/makeproject/api/DefaultProjectActionHandler.java	Mon Apr 07 18:29:23 2008 -0700
@@ -436,6 +436,10 @@ public class DefaultProjectActionHandler
                 } catch (java.io.IOException ioe) {
                 }
             } else if (pae.getID() == ProjectActionEvent.CUSTOM_ACTION) {
+                progressHandle.finish();
+                progressHandle = createPogressHandleNoCancel();
+                progressHandle.start();
+                customActionHandler.addExecutionListener(this);
                 customActionHandler.execute(pae, getTab());
             } else if (pae.getID() == ProjectActionEvent.DEBUG ||
                     pae.getID() == ProjectActionEvent.DEBUG_STEPINTO ||

Comment 2 Alexander Pepin 2008-04-08 13:08:55 UTC
The fix is incomplete (failed).
- quite often progress bar does not disappear for debugger (dbx)
- wrong behavior, the progress bar disappears just after its appearing. It should disappear only after finishing the
process (DBX, RTC, Thread Analyzer, Performance Analyzer). Now progress bar works properly only for Run command.
Comment 3 Thomas Preisler 2008-04-08 16:54:14 UTC
To clarify:

CND sets up and starts the progress bar when it starts a custom tool (like rtc in SunStudio) and dismisses it again when it receives a executionFinished() from the tool. CND never listened to executionFinished() notifications from custom tools causing the progress bar to never being dismissed. This fix in CND is just to listen to finish 
notifications from custom tools and the progress bar will get dismissed.

You may still see incorrect behavior like the progress bar being dismissed prematurely. It is caused by the tool sending the finish notification before it is completely done 
and this problem should be fixed in the tool and cannot be fixed in CND.

This fix in CND enables a tool to control the progressbar and enables it to dismiss the bar when it is done.

Without this fix in CND the progress bar will stay up forever which is very bad.


Comment 4 Thomas Preisler 2008-04-08 20:52:40 UTC
Fixed in release61:

changeset 275487877367 in release61
details: http://hg.netbeans.org/release61?cmd=changeset;node=275487877367
description:
	132275 SS: progress bar is not finished
Comment 5 Alexander Pepin 2008-04-09 14:15:02 UTC
verifien in SS IDE based on NB6.1 (build 20080408015310)