Author: dgolovin
Date: 2007-10-22 21:40:21 -0400 (Mon, 22 Oct 2007)
New Revision: 4440
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1141
not copy utils check for copying file to itself.
some cleanup and refactoring has been done for I18N.
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-10-23
01:40:16 UTC (rev 4439)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-10-23
01:40:21 UTC (rev 4440)
@@ -53,7 +53,7 @@
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
+import org.jboss.tools.seam.core.project.facet.SeampProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
@@ -190,24 +190,24 @@
*/
private String getDefaultDbType() {
// TODO Auto-generated method stub
- return SeamFacetPreference.getStringPreference(
- SeamFacetPreference.HIBERNATE_DEFAULT_DB_TYPE);
+ return SeampProjectPreferences.getStringPreference(
+ SeampProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE);
}
/**
* @return
*/
private Object getDeployAsDefaultValue() {
- return SeamFacetPreference.getStringPreference(
- SeamFacetPreference.JBOSS_AS_DEFAULT_DEPLOY_AS);
+ return SeampProjectPreferences.getStringPreference(
+ SeampProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS);
}
/**
* @return
*/
private Object getConnectionProfileDefaultValue() {
- String defaultDs = SeamFacetPreference.getStringPreference(
- SeamFacetPreference.SEAM_DEFAULT_CONNECTION_PROFILE);
+ String defaultDs = SeampProjectPreferences.getStringPreference(
+ SeampProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE);
return getProfileNameList().contains(defaultDs)?defaultDs:""; //$NON-NLS-1$
}
@@ -216,12 +216,12 @@
* @return
*/
private Object getSeamRuntimeDefaultValue() {
- return ("".equals(SeamFacetPreference //$NON-NLS-1$
- .getStringPreference(SeamFacetPreference.SEAM_DEFAULT_RUNTIME_NAME)) ?
+ return ("".equals(SeampProjectPreferences //$NON-NLS-1$
+ .getStringPreference(SeampProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME)) ?
(SeamRuntimeManager.getInstance().getDefaultRuntime()==null?
"":SeamRuntimeManager.getInstance().getDefaultRuntime().getName()) :
//$NON-NLS-1$
- SeamFacetPreference
- .getStringPreference(SeamFacetPreference.SEAM_DEFAULT_RUNTIME_NAME));
+ SeampProjectPreferences
+ .getStringPreference(SeampProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME));
}
/**
@@ -252,19 +252,19 @@
public void transferStateToConfig() {
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.SEAM_DEFAULT_RUNTIME_NAME,
+ SeampProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME,
jBossSeamHomeEditor.getValueAsString());
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.SEAM_DEFAULT_CONNECTION_PROFILE,
+ SeampProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE,
connProfileSelEditor.getValueAsString());
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.JBOSS_AS_DEFAULT_DEPLOY_AS,
+ SeampProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS,
this.jBossAsDeployAsEditor.getValueAsString());
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.HIBERNATE_DEFAULT_DB_TYPE,
+ SeampProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE,
this.jBossHibernateDbTypeEditor.getValueAsString());
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-10-23
01:40:16 UTC (rev 4439)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-10-23
01:40:21 UTC (rev 4440)
@@ -38,7 +38,7 @@
import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
import org.eclipse.wst.server.ui.ServerUIUtil;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
+import org.jboss.tools.seam.core.project.facet.SeampProjectPreferences;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import
org.jboss.tools.seam.internal.core.project.facet.SeamFacetProjectCreationDataModelProvider;
import org.jboss.tools.seam.ui.SeamUIMessages;
@@ -245,8 +245,8 @@
public void restoreDefaultSettings() {
super.restoreDefaultSettings();
- String lastServerName = SeamFacetPreference
- .getStringPreference(SeamFacetPreference.SEAM_LAST_SERVER_NAME);
+ String lastServerName = SeampProjectPreferences
+ .getStringPreference(SeampProjectPreferences.SEAM_LAST_SERVER_NAME);
if (lastServerName != null && lastServerName.length() > 0) {
SeamFacetProjectCreationDataModelProvider.setServerName(model,lastServerName);
@@ -258,7 +258,7 @@
String serverName =
SeamFacetProjectCreationDataModelProvider.getServerName(model);
if (serverName != null && serverName.length() > 0) {
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.SEAM_LAST_SERVER_NAME,
+ SeampProjectPreferences.SEAM_LAST_SERVER_NAME,
serverName);
}
}