Skip to content

Commit

Permalink
Revised text of checkbox "auto primary key", and disabled the
Browse files Browse the repository at this point in the history
aggregation function of the measure if the option is checked.
- Bugzilla Bug (s) Resolved:
None
- Description:
  • Loading branch information
ning.zhang authored and dgao committed Nov 1, 2011
1 parent abb7235 commit ae8ddd0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public class MeasureDialog extends TitleAreaDialog
{

private boolean isEdit = false;
private boolean isAutoPrimaryKeyChecked = false;
private Combo typeCombo;
private Text expressionText;
private Combo functionCombo;
Expand Down Expand Up @@ -198,6 +199,11 @@ public void setInput( TabularMeasureHandle input )
this.input = input;
}

public void setAutoPrimaryKeyStatus( boolean isChecked )
{
this.isAutoPrimaryKeyChecked = isChecked;
}

/*
* (non-Javadoc) Method declared on Dialog.
*/
Expand Down Expand Up @@ -485,6 +491,7 @@ public void widgetSelected( SelectionEvent e )
}

} );
functionCombo.setEnabled( !isAutoPrimaryKeyChecked );

Label typeLabel = new Label( group, SWT.NONE );
typeLabel.setText( Messages.getString( "MeasureDialog.Label.DataType" ) ); //$NON-NLS-1$
Expand Down Expand Up @@ -519,7 +526,6 @@ public void widgetSelected( SelectionEvent e )
public void modifyText( ModifyEvent e )
{
checkOkButtonStatus( );

}

} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ SimpleCubeBuilder.Title.Title=Cross Tab Cube Builder
SimpleCubeBuilder.Title.Message=Organize your data for the cross tab by specifying grouping hierarchies and summary data fields.
SimpleCubeBuilder.Title=Cross Tab Cube Builder
SimpleCubeBuilder.Label.Name=Name:
DatasetSelectionPage.Label.Auto.Primary.Key=&Check this option if the data in the primary dataset has been grouped and aggregated in a way that matches the cube definition.
DatasetSelectionPage.Label.Auto.Primary.Key=&Check this option to avoid preaggregation in primary data set during cube generation.
DatasetSelectionPage.Text.Auto.Primary.Key=Hint - If this option is checked, BIRT will skip the grouping and aggregation calculation during cube generation to achieve better cube generation performance.
DatasetSelectionPage.Combo.NewDataSet0=<New Data Set...>
GroupsPage.Button.Add=&Add
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ public void drop( DropTargetEvent event )
{
MeasureDialog dialog = new MeasureDialog( false );
dialog.setInput( measure );
dialog.setAutoPrimaryKeyStatus( input.autoPrimaryKey( ) );
if ( dialog.open( ) == Window.CANCEL )
{
SessionHandleAdapter.getInstance( )
Expand Down Expand Up @@ -792,6 +793,7 @@ else if ( element instanceof LevelHandle )
{
MeasureDialog dialog = new MeasureDialog( false );
dialog.setInput( measure );
dialog.setAutoPrimaryKeyStatus( input.autoPrimaryKey( ) );
if ( dialog.open( ) == Window.CANCEL )
{
SessionHandleAdapter.getInstance( )
Expand Down Expand Up @@ -865,6 +867,7 @@ else if ( element instanceof MeasureGroupHandle
{
MeasureDialog dialog = new MeasureDialog( false );
dialog.setInput( measure );
dialog.setAutoPrimaryKeyStatus( input.autoPrimaryKey( ) );
if ( dialog.open( ) == Window.CANCEL )
{
SessionHandleAdapter.getInstance( )
Expand Down Expand Up @@ -1681,6 +1684,7 @@ private void handleAddEvent( )
measure );
MeasureDialog dialog = new MeasureDialog( true );
dialog.setInput( measure );
dialog.setAutoPrimaryKeyStatus( input.autoPrimaryKey( ) );
if ( dialog.open( ) == Window.CANCEL )
{
stack.rollback( );
Expand Down Expand Up @@ -1709,6 +1713,7 @@ else if ( obj instanceof MeasureHandle )
.add( IMeasureGroupModel.MEASURES_PROP, measure );
MeasureDialog dialog = new MeasureDialog( true );
dialog.setInput( measure );
dialog.setAutoPrimaryKeyStatus( input.autoPrimaryKey( ) );
if ( dialog.open( ) == Window.CANCEL )
{
stack.rollback( );
Expand Down Expand Up @@ -2185,6 +2190,7 @@ else if ( obj instanceof DimensionHandle
{
MeasureDialog dialog = new MeasureDialog( false );
dialog.setInput( measure );
dialog.setAutoPrimaryKeyStatus( input.autoPrimaryKey( ) );
if ( dialog.open( ) == Window.CANCEL )
{
stack.rollback( );
Expand Down Expand Up @@ -2239,6 +2245,7 @@ else if ( obj instanceof MeasureHandle )
{
MeasureDialog dialog = new MeasureDialog( false );
dialog.setInput( measure );
dialog.setAutoPrimaryKeyStatus( input.autoPrimaryKey( ) );
if ( dialog.open( ) == Window.CANCEL )
{
stack.rollback( );
Expand Down Expand Up @@ -2463,6 +2470,7 @@ else if ( obj instanceof TabularMeasureHandle )
stack.startTrans( "" ); //$NON-NLS-1$
MeasureDialog dialog = new MeasureDialog( false );
dialog.setInput( level );
dialog.setAutoPrimaryKeyStatus( input.autoPrimaryKey( ) );
if ( dialog.open( ) == Window.OK )
{
stack.commit( );
Expand Down

0 comments on commit ae8ddd0

Please sign in to comment.