Community
Participate
Working Groups
Build Identifier: Indigo Release 20110609-2236 In the Extension Points, define a vew NOT restorable. <view id="..." name="..." class="..." allowMultiple="true" restorable="false"> </view> All the views that are "stacked" (minimized) are NOT closed when the workbench closes Manually closing the views causes undesired effects on ISaveablePart2 Reproducible: Always Steps to Reproduce: 1. Define a "restorable=false" view Extension point 2. Run app and MINIMIZE view 3. Restart app 4. The minimized view is restored with the workbench This does not happen with maximized views.
I use a workaround: manually close the views public static void hideViews(IWorkbenchPage page) { //list of views VISIBLE on this page IViewReference[] views=page.getViewReferences(); for(int i=0; i<views.length; i++) { //hide view } } but this triggers the promptToSaveOnClose on ISaveablePart2 that was already called by the closing workbench (i assume)
Implemented a workaround to avoid the "double" question on promptToSaveOnClose public int promptToSaveOnClose() { if (PlatformUI.getWorkbench().isClosing()) return ISaveablePart2.CANCEL; ... } So, a nice workaround: 1) Closing the views manually 2) A promptToSaveOnClose method that avoids the prompt when the workbench is closing It will work for now, until you verify the BUG.
Certainly sounds like a bug to me, Marco. I have fixed this in the 4.x stream. See bug 358578.
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. If you have further information on the current state of the bug, please add it. 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. If the bug is still relevant, please remove the "stalebug" whiteboard tag.