Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » DataTextDropListener drop behavior changed(Drag/drop behavior in chart wizard)
DataTextDropListener drop behavior changed [message #739598] Mon, 17 October 2011 12:36 Go to next message
Carl  is currently offline Carl
Messages: 1
Registered: October 2011
Junior Member
Last year I integrated BIRT 2.3.2 into our product so that customers could use the chart wizard to create/manage their own charts. Upon upgrading eclipse to 3.7, we upgraded BIRT to 3.7 as well. While testing the chart wizard, I noticed that the drag/drop to the x/y axis fields no longer works. Specifically, the code that assigns the value has been commented out of DataTextDropListener.

	public void drop( DropTargetEvent event )
	{
		String bindingName = (String) event.data;
		
		// Since in Mac os X/ Linux, the dragEnter method did not validate
		// expression, so
		// here validate the expression. 
		if ( !Platform.OS_WIN32.equals( Platform.getOS( ) ) )
		{
			ExpressionCodec expCodec = ChartModelHelper.instance( )
					.createExpressionCodec( );
			expCodec.setBindingName( bindingName, btnBuilder.isCube( ) );
			if ( !DataDefinitionTextManager.getInstance( )
					.isValidExpression( txtDataDefn, expCodec.getExpression( ) ) )
			{
				return;
			}
		}
		
		btnBuilder.setBindingName( bindingName, true );
		// String expression = (String) event.data;
		// // If it's last element, remove color binding
		// if ( !expression.equals( ChartUIUtil.getText( txtDataDefn ) )
		// && DataDefinitionTextManager.getInstance( )
		// .getNumberOfSameDataDefinition( ChartUIUtil.getText( txtDataDefn ) )
		// == 1 )
		// {
		// ColorPalette.getInstance( ).retrieveColor( ChartUIUtil.getText(
		// txtDataDefn ) );
		// }
		//
		// // Check if dragged expression can be put on target series. For
		// sharing
		// // binding case, Y optional only allow grouped binding.
		// if ( !DataDefinitionTextManager.getInstance( )
		// .isValidExpression( txtDataDefn, expression ) )
		// {
		// return;
		// }
		//
		// btnBuilder.setExpression( expression );
		//
		// DataDefinitionTextManager.getInstance( ).updateQuery( txtDataDefn );
		//
		// // Refresh all data definition text
		// DataDefinitionTextManager.getInstance( ).refreshAll( );
	}



Can anyone explain to me why this code was commented out? Is there a work-around?

Thanks,
Carl
Re: DataTextDropListener drop behavior changed [message #739631 is a reply to message #739598] Mon, 17 October 2011 13:16 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I am not certain why this was commented out. Can you open a bugzilla
entry with the question?

Jason

On 10/17/2011 12:36 PM, Carl wrote:
> Last year I integrated BIRT 2.3.2 into our product so that customers
> could use the chart wizard to create/manage their own charts. Upon
> upgrading eclipse to 3.7, we upgraded BIRT to 3.7 as well. While testing
> the chart wizard, I noticed that the drag/drop to the x/y axis fields no
> longer works. Specifically, the code that assigns the value has been
> commented out of DataTextDropListener.
>
>
> public void drop( DropTargetEvent event )
> {
> String bindingName = (String) event.data;
>
> // Since in Mac os X/ Linux, the dragEnter method did not validate
> // expression, so
> // here validate the expression. if ( !Platform.OS_WIN32.equals(
> Platform.getOS( ) ) )
> {
> ExpressionCodec expCodec = ChartModelHelper.instance( )
> .createExpressionCodec( );
> expCodec.setBindingName( bindingName, btnBuilder.isCube( ) );
> if ( !DataDefinitionTextManager.getInstance( )
> .isValidExpression( txtDataDefn, expCodec.getExpression( ) ) )
> {
> return;
> }
> }
>
> btnBuilder.setBindingName( bindingName, true );
> // String expression = (String) event.data;
> // // If it's last element, remove color binding
> // if ( !expression.equals( ChartUIUtil.getText( txtDataDefn ) )
> // && DataDefinitionTextManager.getInstance( )
> // .getNumberOfSameDataDefinition( ChartUIUtil.getText( txtDataDefn ) )
> // == 1 )
> // {
> // ColorPalette.getInstance( ).retrieveColor( ChartUIUtil.getText(
> // txtDataDefn ) );
> // }
> //
> // // Check if dragged expression can be put on target series. For
> // sharing
> // // binding case, Y optional only allow grouped binding.
> // if ( !DataDefinitionTextManager.getInstance( )
> // .isValidExpression( txtDataDefn, expression ) )
> // {
> // return;
> // }
> //
> // btnBuilder.setExpression( expression );
> //
> // DataDefinitionTextManager.getInstance( ).updateQuery( txtDataDefn );
> //
> // // Refresh all data definition text
> // DataDefinitionTextManager.getInstance( ).refreshAll( );
> }
>
>
>
> Can anyone explain to me why this code was commented out? Is there a
> work-around?
> Thanks,
> Carl
Previous Topic:BIRT 3.7 emitter dependencies
Next Topic:Heat map in birt
Goto Forum:
  


Current Time: Fri Aug 22 11:48:41 EDT 2014

Powered by FUDForum. Page generated in 0.14164 seconds