Bug 181355 Cross tab layout behavior
- add a cross tab item - try to drag and drop a level from the cube( in data explorer ) into the cross tab layout Currently this is not supported. User can only drag dimension nodes. Expected behavior - User should be able to drag level nodes too, this should actually add dimension to the cross tabl row/column area
xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/editors/editpolicies/CrosstabCellFlowLayoutEditPolicy.java
return ( (DimensionViewHandle) handle ).getAxisType( );
			}
			handle = handle.getContainer( );
		}
		return -1;
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.birt.report.designer.internal.ui.editors.schematic.editpolicies.ReportFlowLayoutEditPolicy#createAddCommand(org.eclipse.gef.EditPart,
	 *      org.eclipse.gef.EditPart, org.eclipse.gef.EditPart)
	 */
	protected Command createAddCommand( EditPart parent, EditPart child,
			EditPart after )
	{
		Object parentObj = parent.getModel( );
		Object source = child.getModel( );
		Object afterObj = after == null ? null : after.getModel( );
		Object childParent = child.getParent( ).getModel( );
		if (parentObj instanceof CrosstabCellAdapter && childParent instanceof CrosstabCellAdapter)
		{
			CrosstabCellAdapter childAdapter = (CrosstabCellAdapter)childParent;
			CrosstabCellAdapter parentAdapter = (CrosstabCellAdapter)parentObj;
			if (isFirstDataItem( childAdapter, child.getModel( ), ICrosstabCellAdapterFactory.CELL_FIRST_LEVEL_HANDLE )
				&& (ICrosstabCellAdapterFactory.CELL_FIRST_LEVEL_HANDLE.equals( parentAdapter.getPositionType( ) )
				|| ICrosstabCellAdapterFactory.CELL_LEVEL_HANDLE.equals( parentAdapter.getPositionType( )))
				)
			{
				if (afterObj != parentAdapter.getFirstDataItem( ))
				{