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 99155 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/IPageLayout.java (+31 lines)
Lines 351-356 Link Here
351
            int relationship, float ratio, String refId);
351
            int relationship, float ratio, String refId);
352
352
353
    /**
353
    /**
354
     * Adds a standalone view placeholder to this page layout.
355
     * A view placeholder is used to define the position of a view before the view
356
     * appears.  Initially, it is invisible; however, if the user ever opens a view
357
     * whose compound id matches the placeholder, the view will appear at the same
358
     * location as the placeholder.  
359
     * See the {@link IPageLayout} type documentation for more details about compound ids.
360
     * If the placeholder contains wildcards, it remains in the layout, otherwise 
361
     * it is replaced by the view.
362
     * If the primary id of the placeholder has no wildcards, it must refer to a view 
363
     * contributed to the workbench's view extension point 
364
     * (named <code>"org.eclipse.ui.views"</code>).
365
     *
366
     * @param viewId the compound view id (wildcards allowed)
367
     * @param relationship the position relative to the reference part;
368
     *  one of <code>TOP</code>, <code>BOTTOM</code>, <code>LEFT</code>,
369
     *  or <code>RIGHT</code>
370
     * @param ratio a ratio specifying how to divide the space currently occupied by the reference part,
371
     *    in the range <code>0.05f</code> to <code>0.95f</code>.
372
     *    Values outside this range will be clipped to facilitate direct manipulation.
373
     *    For a vertical split, the part on top gets the specified ratio of the current space
374
     *    and the part on bottom gets the rest.
375
     *    Likewise, for a horizontal split, the part at left gets the specified ratio of the current space
376
     *    and the part at right gets the rest.
377
     * @param refId the id of the reference part; either a view id, a folder id,
378
     *   or the special editor area id returned by <code>getEditorArea</code>
379
     * @param showTitle true to show the view's title, false if not
380
     */
381
    public void addStandaloneViewPlaceholder(String viewId,
382
            int relationship, float ratio, String refId,boolean showTitle);
383
    
384
    /**
354
     * Returns the special identifier for the editor area in this page 
385
     * Returns the special identifier for the editor area in this page 
355
     * layout.  The identifier for the editor area is also stored in
386
     * layout.  The identifier for the editor area is also stored in
356
     * <code>ID_EDITOR_AREA</code>.
387
     * <code>ID_EDITOR_AREA</code>.
(-)Eclipse UI/org/eclipse/ui/internal/PageLayout.java (+25 lines)
Lines 429-434 Link Here
429
        return new PlaceholderFolderLayout(this, folder);
429
        return new PlaceholderFolderLayout(this, folder);
430
    }
430
    }
431
431
432
    /* (non-Javadoc)
433
     * @see org.eclipse.ui.IPageLayout#addStandaloneViewPlaceholder(java.lang.String, int, float, java.lang.String, boolean)
434
     */
435
    public void addStandaloneViewPlaceholder(String viewId,
436
            int relationship, float ratio, String refId,boolean showTitle) {
437
438
        // Create the folder.
439
        ContainerPlaceholder folder = new ContainerPlaceholder(null);
440
        folder.setContainer(rootLayoutContainer);
441
        int appearance = PresentationFactoryUtil.ROLE_STANDALONE;
442
        if (!showTitle)
443
        	appearance = PresentationFactoryUtil.ROLE_STANDALONE_NOTITLE;
444
        folder.setRealContainer(new ViewStack(rootLayoutContainer.page,true, appearance, null));
445
        folder.setID(viewId + ".standalonefolder"); //$NON-NLS-1$
446
        addPart(folder, viewId + ".standalonefolder", relationship, ratio, refId); //$NON-NLS-1$
447
448
        // Create a wrapper.
449
        PlaceholderFolderLayout placeHolder =  new PlaceholderFolderLayout(this, folder);
450
        
451
        //Add the standalone view immediately
452
        placeHolder.addPlaceholder(viewId);
453
    }
454
        
455
    
432
    /**
456
    /**
433
     * Create a new <code>LayoutPart</code>.
457
     * Create a new <code>LayoutPart</code>.
434
     * 
458
     * 
Lines 823-826 Link Here
823
			mapIDtoViewLayoutRec.remove(id);
847
			mapIDtoViewLayoutRec.remove(id);
824
		}
848
		}
825
	}
849
	}
850
826
}
851
}
(-)Eclipse UI/org/eclipse/ui/internal/registry/PerspectiveExtensionReader.java (-1 / +10 lines)
Lines 9-14 Link Here
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 *     Dan Rubel <dan_rubel@instantiations.com>
10
 *     Dan Rubel <dan_rubel@instantiations.com>
11
 *     - Fix for bug 11490 - define hidden view (placeholder for view) in plugin.xml
11
 *     - Fix for bug 11490 - define hidden view (placeholder for view) in plugin.xml
12
 *     Chris Gross <schtoo@schtoo.com> - Fix for 99155 - allow standalone view
13
 *     		placeholders
12
 *******************************************************************************/
14
 *******************************************************************************/
13
15
14
package org.eclipse.ui.internal.registry;
16
package org.eclipse.ui.internal.registry;
Lines 256-262 Link Here
256
                    pageLayout.addView(id, intRelation, ratio, relative);
258
                    pageLayout.addView(id, intRelation, ratio, relative);
257
                }
259
                }
258
            } else {
260
            } else {
259
                pageLayout.addPlaceholder(id, intRelation, ratio, relative);
261
            	//Fix for 99155, CGross (schtoo@schtoo.com)
262
            	//Adding standalone placeholder for standalone views
263
            	if (VAL_TRUE.equals(standalone)) {
264
            		pageLayout.addStandaloneViewPlaceholder(id, intRelation, ratio, relative,!VAL_FALSE
265
                            .equals(showTitle));
266
            	} else {
267
            		pageLayout.addPlaceholder(id, intRelation, ratio, relative);
268
            	}
260
            }
269
            }
261
        }
270
        }
262
        if (closeable != null) {
271
        if (closeable != null) {

Return to bug 99155