/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.item.crosstab.internal.ui.dialogs;

import org.eclipse.birt.report.designer.ui.dialogs.ExpressionProvider;
import org.eclipse.birt.report.designer.ui.expressions.ExpressionFilter;
import org.eclipse.birt.report.model.api.DesignElementHandle;

/**
 * 
 */

public class CrosstabComputedMeasureExpressionProvider extends
		CrosstabExpressionProvider
{

	public CrosstabComputedMeasureExpressionProvider( DesignElementHandle handle )
	{
		super( handle, null );
	}

	protected void addFilterToProvider( )
	{
		this.addFilter( new ExpressionFilter( ) {

			public boolean select( Object parentElement, Object element )
			{
				if ( ExpressionFilter.CATEGORY.equals( parentElement )
						&& ExpressionProvider.CURRENT_CUBE.equals( element ) )
				{
					return false;
				}
				return true;
			}
		} );
	}

}

@@ -1019,16 +1019,18 @@
  );%0A%09%7D%0A%0A
+//
 %09protect
@@ -1060,19 +1060,23 @@
 ider( )%0A
+//
 %09%7B%0A
+//
 %09%09this.a
@@ -1111,17 +1111,21 @@
 er( ) %7B%0A
-%0A
+//%0A//
 %09%09%09publi
@@ -1181,21 +1181,25 @@
 ement )%0A
+//
 %09%09%09%7B%0A
+//
 %09%09%09%09if (
@@ -1249,16 +1249,18 @@
 ement )%0A
+//
 %09%09%09%09%09%09&&
@@ -1316,14 +1316,18 @@
 ) )%0A
+//
 %09%09%09%09%7B%0A
+//
 %09%09%09%09
@@ -1345,14 +1345,18 @@
 se;%0A
+//
 %09%09%09%09%7D%0A
+//
 %09%09%09%09
@@ -1372,20 +1372,26 @@
 ue;%0A
+//
 %09%09%09%7D%0A
+//
 %09%09%7D );%0A
+//
 %09%7D%0A%0A

Remove the restriction on cube element on the expression builder when creating a derived measure.