Bug 173221 Focus is not on the new added item in library [00]
Description: Focus is not on the new added item in library. Build number: 2.2.0.v20070207-0941 Steps to reproduce: 1. New a Library, right click to add a report item in Layout. Expected result: Focus is on the new added report item. Actual result: Focus is lost. Error log: N/A
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/actions/BaseInsertMenuAction.java
* Returns the container slotHandle.
	 * 
	 */
	private SlotHandle getDefaultSlotHandle( String insertType )
	{
		IStructuredSelection models = InsertInLayoutUtil.editPart2Model( getSelection( ) );
		if ( models.isEmpty( ) )
		{
			return null;
		}
		model = models.getFirstElement( );
		if ( model instanceof SlotHandle )
		{
			return (SlotHandle) model;
		}
		else if ( model instanceof DesignElementHandle )
		{
			DesignElementHandle handle = (DesignElementHandle) model;
			if ( handle.getDefn( ).isContainer( ) )
			{
				int slotId = DEUtil.getDefaultSlotID( handle );
				if ( handle.canContain( slotId, insertType ) )
				{
					return handle.getSlot( slotId );
				}
			}
			return handle.getContainerSlotHandle( );
		}
		return null;
	}