summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2012-04-09 03:49:15 (EDT)
committer mwu2012-04-09 03:49:15 (EDT)
commitd6da4a0e018d49538112eefb201d89487a33dfb1 (patch)
tree84250958cc3d363765009698fe9699675e78165f
parent7d35d9b6400ecb268e101f8b356c6561bf3c382e (diff)
downloadorg.eclipse.birt-d6da4a0e018d49538112eefb201d89487a33dfb1.zip
org.eclipse.birt-d6da4a0e018d49538112eefb201d89487a33dfb1.tar.gz
org.eclipse.birt-d6da4a0e018d49538112eefb201d89487a33dfb1.tar.bz2
fix 47654
summary: Data Source created using connection profile to classicmodels sample DB is not shown as created using connection profile Description: Now do not support external file for sample db, raised an user message when a sampledb data source is first created from an externalized profile by sampled data source wizard page.
-rw-r--r--data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/i18n/Messages.properties3
-rw-r--r--data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/profile/SampleDbSelectionPageHelper.java12
2 files changed, 9 insertions, 6 deletions
diff --git a/data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/i18n/Messages.properties b/data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/i18n/Messages.properties
index bae7fd6..ff141ba 100644
--- a/data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/i18n/Messages.properties
+++ b/data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/i18n/Messages.properties
@@ -6,4 +6,5 @@ datasource.page.user=Database User:
datasource.upgrade.msg.firstLine=The Data Source ({0}) used by this data set was created using an older release of this product.
datasource.upgrade.msg.secondLine=Its definition needs to be updated. \n\nChoose ''OK'' to update data source {0} now.
datasource.upgrade.msg.thirdLine=You will then need to re-open this data set editor.
-datasource.propertyPage.tooltip=JDBC Data Source \ No newline at end of file
+datasource.propertyPage.tooltip=JDBC Data Source
+datasource.page.warning=The use of externalized connection profile is not supported for the sample db, \n the design is being changed to use local properties \ No newline at end of file
diff --git a/data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/profile/SampleDbSelectionPageHelper.java b/data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/profile/SampleDbSelectionPageHelper.java
index 62d31d7..607b5a5 100644
--- a/data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/profile/SampleDbSelectionPageHelper.java
+++ b/data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/profile/SampleDbSelectionPageHelper.java
@@ -23,6 +23,7 @@ import org.eclipse.birt.report.data.oda.sampledb.SampleDBJDBCConnectionFactory;
import org.eclipse.birt.report.data.oda.sampledb.ui.i18n.Messages;
import org.eclipse.birt.report.data.oda.sampledb.ui.plugin.SampledbUIPlugin;
import org.eclipse.datatools.connectivity.oda.util.manifest.ConnectionProfileProperty;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
@@ -79,8 +80,9 @@ public class SampleDbSelectionPageHelper
new Label( content, SWT.LEFT ).setText( Messages.getMessage( "datasource.page.user" ) ); //$NON-NLS-1$
m_sampleUser = new Label( content, SWT.LEFT );
m_sampleUser.setText( SampleDBJDBCConnectionFactory.getDbUser( ) );//$NON-NLS-1$
- setMessage( DEFAULT_MESSAGE );
+ setMessage( Messages.getMessage( "datasource.page.warning" ), IMessageProvider.WARNING);
+
PlatformUI.getWorkbench( ).getHelpSystem( ).setHelp( getControl(),
CONEXT_ID_DATASOURCE_SAMPLEDB );
}
@@ -104,7 +106,7 @@ public class SampleDbSelectionPageHelper
// sampledb uses predined connection property values, and does not support
// external reference to a connection profile
-// props.setProperty( ConnectionProfileProperty.PROFILE_STORE_FILE_PATH_PROP_KEY, "" );
+ props.setProperty( ConnectionProfileProperty.PROFILE_STORE_FILE_PATH_PROP_KEY, "" );
BidiFormat externalDefaultBDiFormat = new BidiFormat( SampledbUIPlugin.getDefault( )
.getPluginPreferences( )
@@ -169,12 +171,12 @@ public class SampleDbSelectionPageHelper
* set message
* @param message
*/
- private void setMessage( String message )
+ private void setMessage( String message, int type )
{
if ( m_wizardPage != null )
- m_wizardPage.setMessage( message );
+ m_wizardPage.setMessage( message, type );
else if ( m_propertyPage != null )
- m_propertyPage.setMessage( message );
+ m_propertyPage.setMessage( message, type );
}
private Control getControl()