Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339210

Summary: Title and note are being ignored by UIProcess window on second start()
Product: [RT] Riena Reporter: Stephan Mann <stephan.mann>
Component: UIAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.campo
Version: 2.1.0   
Target Milestone: 3.0.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch that recreates the problem inside the example application.
none
Uses the same instance of Job and UIProcess every time one of the buttons is pressed.
none
Patch allowing UIProcess to be reused. start() now returns a boolean value representing the result of scheduling none

Description Stephan Mann CLA 2011-03-08 07:36:20 EST
If a new instance of a UIProcess is created and started, the title and the note are properly displayed in the visualization window. If the same instance of the UIProcess is started again, the title and note are ignored. The process name gets displayed for both of them.
Comment 1 Stephan Mann CLA 2011-03-08 07:37:15 EST
Created attachment 190649 [details]
Patch that recreates the problem inside the example application.
Comment 2 Christian Campo CLA 2011-03-08 07:54:58 EST
Maybe I am wrong, but I believe a UIProcess should only be started once ? What about Eclipse Jobs ? Can you start them multiple times.
Comment 3 Stephan Mann CLA 2011-03-08 08:20:45 EST
Yes, you can. I'm attaching another patch that includes the first one. It starts the same instance of an "Eclipse Job" as many times as the button is pressed. 
If a UIProcess is indeed supposed to be started only once, I would have expected to not be able to start it again but receive some kind of exception.
Comment 4 Stephan Mann CLA 2011-03-08 08:23:20 EST
Created attachment 190655 [details]
Uses the same instance of Job and UIProcess every time one of the buttons is pressed.
Comment 5 Stephan Mann CLA 2011-03-09 08:39:43 EST
The problem has at least one other aspect: The hook initialUpdateUI() is also called only on the first execution of the process but not on any subsequent execution. However, the hook finalUpdateUI() is called every time.
Comment 6 Nobody - feel free to take it CLA 2011-03-14 08:37:23 EDT
Behaviour reproduced. The UIProcess should be restartable.
Comment 7 Nobody - feel free to take it CLA 2011-03-14 08:42:27 EDT
Created attachment 191105 [details]
Patch allowing UIProcess to be reused. start() now returns a boolean value representing the result of scheduling
Comment 8 Stephan Mann CLA 2011-04-01 03:50:36 EDT
Patch works for me. Please commit. Thanks!
Comment 9 Nobody - feel free to take it CLA 2011-05-20 06:00:23 EDT
Fix allow reuse of UIProcess. start() now returns a boolean value reflecting if the process could be started or if the process is in "running, waiting or sleeping" state.