[jboss-svn-commits] JBL Code SVN: r35346 - labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Sep 29 06:01:36 EDT 2010


Author: dennyxu
Date: 2010-09-29 06:01:36 -0400 (Wed, 29 Sep 2010)
New Revision: 35346

Modified:
   labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/GuvnorPreferencePage.java
   labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/IGuvnorPreferenceConstants.java
Log:
change the default guvnor connection url to jboss-brms

Modified: labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/GuvnorPreferencePage.java
===================================================================
--- labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/GuvnorPreferencePage.java	2010-09-29 09:59:26 UTC (rev 35345)
+++ labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/GuvnorPreferencePage.java	2010-09-29 10:01:36 UTC (rev 35346)
@@ -137,9 +137,12 @@
 	protected void performDefaults() {
 		IPreferenceStore store = Activator.getDefault().getPreferenceStore();
 		
-		store.putValue(IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_PREF, 
-				      IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_DEFAULT);
-		guvnorURLTemplate.setText(IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_DEFAULT);
+		String defaultLoc = store.getDefaultString(IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_PREF);
+		if(defaultLoc == null || "".equals(defaultLoc)){
+			defaultLoc = IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_DEFAULT;
+		}
+		store.putValue(IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_PREF, defaultLoc);
+		guvnorURLTemplate.setText(defaultLoc);
 		
 		store.putValue(IGuvnorPreferenceConstants.SAVE_PASSWORDS_PREF, 
 				      String.valueOf(true));
@@ -195,7 +198,7 @@
 		IPreferenceStore store = Activator.getDefault().getPreferenceStore();
 		String res = null;
 		if (!store.contains(IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_PREF)) {
-			res = IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_DEFAULT_ORG;
+			res = IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_DEFAULT;
 			store.putValue(IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_PREF, res);
 		} else {
 			res = store.getString(IGuvnorPreferenceConstants.GUVNOR_LOC_TEMPLATE_PREF);

Modified: labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/IGuvnorPreferenceConstants.java
===================================================================
--- labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/IGuvnorPreferenceConstants.java	2010-09-29 09:59:26 UTC (rev 35345)
+++ labs/jbossrules/soa_branches/BRMS-5.1.1/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/IGuvnorPreferenceConstants.java	2010-09-29 10:01:36 UTC (rev 35346)
@@ -28,7 +28,6 @@
 	public String GUVNOR_LOC_TEMPLATE_PREF = "guvnor_loc_template"; //$NON-NLS-1$
 	
 	public String GUVNOR_LOC_TEMPLATE_DEFAULT = "http://localhost:8080/jboss-brms/org.drools.guvnor.Guvnor/webdav/"; //$NON-NLS-1$
-	public String GUVNOR_LOC_TEMPLATE_DEFAULT_ORG = "http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/"; //$NON-NLS-1$
 	
 	public String SAVE_PASSWORDS_PREF = "save_passwords"; //$NON-NLS-1$
 	



More information about the jboss-svn-commits mailing list