Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 234484
Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/PerspectiveHelper.java (+11 lines)
Lines 1286-1291 Link Here
1286
    }
1286
    }
1287
1287
1288
    /**
1288
    /**
1289
     * Used to explicitly close and remove a DW that's being closed
1290
     * but that has no visible views. See bug 234484.
1291
     * 
1292
     * @param dw The DW to close
1293
     */
1294
    public void closeDetachedWindow(DetachedWindow dw) {
1295
    	dw.getShell().close();
1296
        detachedWindowList.remove(dw);
1297
    }
1298
    
1299
    /**
1289
     * Add a part to the presentation.
1300
     * Add a part to the presentation.
1290
     * 
1301
     * 
1291
     * Note: unlike all other LayoutParts, PartPlaceholders will still point to
1302
     * Note: unlike all other LayoutParts, PartPlaceholders will still point to
(-)Eclipse UI/org/eclipse/ui/internal/DetachedWindow.java (+6 lines)
Lines 260-265 Link Here
260
            List views = new ArrayList();
260
            List views = new ArrayList();
261
            collectViewPanes(views, getChildren());
261
            collectViewPanes(views, getChildren());
262
            
262
            
263
            // Surgical fix: -explicitly- close and remove
264
            // this DW if it's already empty. See bug 234484.
265
            if (views.size() == 0) {
266
            	page.getActivePerspective().getPresentation().closeDetachedWindow(this);
267
            }
268
            
263
            // Save any drty views
269
            // Save any drty views
264
            if (!handleSaves(views)) {
270
            if (!handleSaves(views)) {
265
            	return false;  // User canceled the save
271
            	return false;  // User canceled the save

Return to bug 234484