summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorning.zhang2011-11-01 09:50:12 (EDT)
committer dgao2011-11-01 09:50:12 (EDT)
commit54f69bfc4e5b96d4434952eab45ed9d322a48a3f (patch)
tree30c8eceb4c04740faf7588d89e5d16088437356e
parent0221423cf28c6cf55cd098116171c156f6a39f18 (diff)
downloadorg.eclipse.birt-54f69bfc4e5b96d4434952eab45ed9d322a48a3f.zip
org.eclipse.birt-54f69bfc4e5b96d4434952eab45ed9d322a48a3f.tar.gz
org.eclipse.birt-54f69bfc4e5b96d4434952eab45ed9d322a48a3f.tar.bz2
Change data set dialog should not always pop up when user do not
change the binding data set - Bugzilla Bug (s) Resolved: None - Description:
-rw-r--r--UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/provider/BindingGroupDescriptorProvider.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/provider/BindingGroupDescriptorProvider.java b/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/provider/BindingGroupDescriptorProvider.java
index 4c7e92c..b7d2d79 100644
--- a/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/provider/BindingGroupDescriptorProvider.java
+++ b/UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/attributes/provider/BindingGroupDescriptorProvider.java
@@ -116,6 +116,8 @@ public class BindingGroupDescriptorProvider extends AbstractDescriptorProvider
BindingInfo info = (BindingInfo) saveValue;
int type = info.getBindingType( );
String value = info.getBindingValue( ).toString( );
+ String oldValue = ( (BindingInfo) load( ) ).getBindingValue( )
+ .toString( );
switch ( type )
{
case ReportItemHandle.DATABINDING_TYPE_DATA :
@@ -124,10 +126,10 @@ public class BindingGroupDescriptorProvider extends AbstractDescriptorProvider
value = null;
}
int ret = 0;
- if ( ( !NONE.equals( ( (BindingInfo) load( ) ).getBindingValue( )
- .toString( ) ) || getReportItemHandle( ).getColumnBindings( )
+ if ( ( !NONE.equals( oldValue ) || getReportItemHandle( ).getColumnBindings( )
.iterator( )
- .hasNext( ) ) )
+ .hasNext( ) )
+ && !( value != null && value.equals( oldValue ) ) )
{
MessageDialog prefDialog = new MessageDialog( UIUtil.getDefaultShell( ),
Messages.getString( "dataBinding.title.changeDataSet" ),//$NON-NLS-1$
@@ -179,11 +181,11 @@ public class BindingGroupDescriptorProvider extends AbstractDescriptorProvider
return;
}
int ret1 = 0;
- if ( !NONE.equals( ( (BindingInfo) load( ) ).getBindingValue( )
- .toString( ) )
+ if ( ( !NONE.equals( oldValue )
|| getReportItemHandle( ).getColumnBindings( )
- .iterator( )
- .hasNext( ) )
+ .iterator( )
+ .hasNext( ) )
+ && !( value != null && value.equals( oldValue ) ) )
{
MessageDialog prefDialog = new MessageDialog( UIUtil.getDefaultShell( ),