Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 218197 - [Workbench] Handle missing parts on startup more elegantly
Summary: [Workbench] Handle missing parts on startup more elegantly
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 233617 237727 240453 245789 (view as bug list)
Depends on: 90582 119040
Blocks:
  Show dependency tree
 
Reported: 2008-02-07 11:26 EST by Kim Horne CLA
Modified: 2021-07-18 03:56 EDT (History)
11 users (show)

See Also:
Mike_Wilson: pmc_approved+
eclipse: review+
pwebster: review+


Attachments
Patch allowing clients to set the WB's StatusManager style for restore failures (4.73 KB, patch)
2008-02-07 15:02 EST, Eric Moffatt CLA
no flags Details | Diff
Simpler patch that uses the StatusManager to LOG the event rather than SHOW'ing it... (996 bytes, patch)
2008-05-26 15:03 EDT, Eric Moffatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Horne CLA 2008-02-07 11:26:58 EST
If you have a view open on shutdown that is subsequently removed (via update manager or because the workspace was opened with a different Eclipse instance) you are greeted with an error dialog on startup saying that the workbench layout cannot be restored.  While it is indeed worth noting this condition, treating it as a severe error is, I feel, too extreme.  Merely switching between Eclipse instances shouldn't invoke this kind of response.  Simply logging the message as a warning or error should be sufficient.  

Other alternatives:
provide a "dont show me again" box in this error dialog that looks to a preference that can be overridden by plugin_customization.ini
move IDEStatusHandler to API so that products could choose to ignore the error or handle it differently
Comment 1 Eric Moffatt CLA 2008-02-07 15:02:27 EST
Created attachment 89186 [details]
Patch allowing clients to set the WB's StatusManager style for restore failures


We should mark this as "Here be Dragons" (i.e. use with care) since it changes the response 'globally', not just for the particular case of a view not being able to be found...).
Comment 2 Eric Moffatt CLA 2008-02-07 15:04:26 EST
I'm looking at the Dialog stuff now...
Comment 3 Eric Moffatt CLA 2008-02-07 16:05:58 EST
I'm still thinking about this, I'm not comfortable with the current solution (it's too coarse).

There might be an interesting twist on the new preference though. The update manager could set it to LOG for the -first- restart after an update (where changes might reasonably be expected) and then revert to SHOW.

Kim, if we did this would we have to make the preference API or could we keep it internal ?




Comment 4 Eric Moffatt CLA 2008-02-21 09:28:52 EST
I've just changed the header to reflect that this defect should examine all cases where we get 'unexpected' results from a startup. Our current handling is too intrusive when plug-ins are unloaded/removed between starts (i.e. showing a dialog when a view can't be re-created because it isn't -defined- any more).

The basic approach seems clear:

1) Ensure that all the reporting is done through the StatusManager.
2) Clean up the generated exceptions to have more meaningful 'codes', allowing sub-classed StatusManagers enough context to do something meaningful.

Once that's done we can tweak our own StatusManager to LOG rather than SHOW exceptions (using the new codes?).

Also, there's an apparent conflict in the desired behavior even within our useage:

One scenario has an 'update' being performed by the user to remove some 'feature'. Here the user expects that views should go away 'silently'...

The other scenario if someone getting a new eclipse install and opening it against an old WS containing visible views from GEF. In this case the 'error part' would be better since they subsequently want to use the Update Manager to re-install the neceessary feature and want the view to re-appear once the feature is available.
Comment 5 Eric Moffatt CLA 2008-02-21 09:33:35 EST
For my money I think that the second scenario is somewhat less important since it's a workflow that isn't really common in our user community. The issue only occurs when opening a WS that was originally targeted at a GEF-enabled install is opened. If the user had a 'vanilla' WS (called 'cleanInstall' or somesuch) they could open that after a re-install, update/re-add the desired features and then open the real WS after everything is installed. This way no view/editor info would be lost.
Comment 6 Eric Moffatt CLA 2008-05-26 15:03:06 EDT
Created attachment 102030 [details]
Simpler patch that uses the StatusManager to LOG the event rather than SHOW'ing it...
Comment 7 Eric Moffatt CLA 2008-05-26 15:10:53 EDT
Note that if you were trying to restore an editor for which there is no longer a handler you get different restults; You get what appears to be a non-modal dialog telling you that there's a problem followed by a perspective -reset- !!
Comment 8 Eric Moffatt CLA 2008-05-27 09:27:53 EDT
Kim, can you review the patch for me  ?
Comment 9 Eric Moffatt CLA 2008-05-27 09:28:32 EDT
Paul, could you be eyes #2?
Comment 10 Kim Horne CLA 2008-05-27 09:38:58 EDT
Are those strings that are no longer being used referenced anywhere else?   Could we remove those?

Anyhoo, +1.
Comment 11 Eric Moffatt CLA 2008-05-28 12:25:51 EDT
McQ, I think that this is still worth doing even though we can't solve the DetachedWindow case (i.e. you get a 'permanent' empty DW if it only contained a view that can no longer be created).

The current code has this issue, it's not induced by the fix (we're simply using LOG instead of SHOW for the response type). The fix does however cover the non-detached cases...
Comment 12 Mike Wilson CLA 2008-05-28 15:39:50 EDT
+1 for Eric's simpler patch. Need new bugs to track the clean up of the messages and to fix the floating window issue post 3.4
Comment 13 Eric Moffatt CLA 2008-05-28 15:54:28 EDT
Committed in >20080528. Applied the patch.

The other defects have been created (bug 234280 for the messages and bug 234484 for the 'empty' DW's).
Comment 14 Eric Moffatt CLA 2008-05-28 15:57:28 EDT
Ooops, bug 234480 for the messages...
Comment 15 Eric Moffatt CLA 2008-05-29 08:57:56 EDT
Verified in I20080528-2000.
Comment 16 Eric Moffatt CLA 2008-05-29 08:59:50 EDT
Re-open for a deeper fix...
Comment 17 Eric Moffatt CLA 2008-08-07 20:53:56 EDT
Moving to 3.5. The fix for this will require more analysis.
Comment 18 Eric Moffatt CLA 2008-09-03 08:15:06 EDT
*** Bug 245789 has been marked as a duplicate of this bug. ***
Comment 19 Eric Moffatt CLA 2009-03-05 13:47:31 EST
Moving to triage (for now), we should re-target this work for 3.6 when it becomes available...
Comment 20 Eric Moffatt CLA 2009-03-05 13:58:16 EST
*** Bug 233617 has been marked as a duplicate of this bug. ***
Comment 21 Eric Moffatt CLA 2009-03-05 14:16:47 EST
*** Bug 237727 has been marked as a duplicate of this bug. ***
Comment 22 Eric Moffatt CLA 2009-03-05 14:30:34 EST
*** Bug 240453 has been marked as a duplicate of this bug. ***
Comment 23 Eclipse Genie CLA 2021-07-18 03:56:19 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.