JBoss Tools SVN: r6685 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper: model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-05 03:04:27 -0500 (Wed, 05 Mar 2008)
New Revision: 6685
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingView.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1846
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingView.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingView.java 2008-03-05 01:09:56 UTC (rev 6684)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/TypeMappingView.java 2008-03-05 08:04:27 UTC (rev 6685)
@@ -23,6 +23,7 @@
import java.util.Iterator;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
@@ -202,6 +203,12 @@
rightTable
.setSelection( Math.min( sel, rightTable.getItemCount() - 1 ) );
}
+
+ protected void doRemoveAll() {
+ if(MessageDialog.openQuestion( getShell(), "Remove all mappings" , "Do you want to remove all mappings?")) {
+ revEngDef.removeAllTypeMappings();
+ }
+ }
protected void doMoveDown() {
TableItem[] selection = rightTable.getSelection();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-03-05 01:09:56 UTC (rev 6684)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/model/DOMReverseEngineeringDefinition.java 2008-03-05 08:04:27 UTC (rev 6685)
@@ -287,6 +287,14 @@
}
}
}
+
+ public void removeAllTypeMappings() {
+ List list = getTypeMappingsList();
+ for (java.util.Iterator it = list.iterator(); it.hasNext(); ) {
+ ITypeMapping filter = (ITypeMapping)it.next();
+ removeTypeMapping(filter);
+ }
+ }
public void removeTypeMapping(ITypeMapping item) {
if ( item instanceof TypeMappingAdapter) {
17 years
JBoss Tools SVN: r6684 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: widget/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-03-04 20:09:56 -0500 (Tue, 04 Mar 2008)
New Revision: 6684
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1786 error message for version incompatibility is changed to warning
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2008-03-05 00:28:14 UTC (rev 6683)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2008-03-05 01:09:56 UTC (rev 6684)
@@ -151,7 +151,7 @@
}
String version = (String) context;
- if(version.startsWith("2.0")) { //$NON-NLS-1$
+ if(version.startsWith("2.")) { //$NON-NLS-1$
File seamJarFile = new File(value.toString(), "lib/jboss-seam.jar"); //$NON-NLS-1$
if (!seamJarFile.isFile()) {
errors = createErrorMap();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2008-03-05 00:28:14 UTC (rev 6683)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2008-03-05 01:09:56 UTC (rev 6684)
@@ -540,9 +540,7 @@
}
if (seamVersion != null && validSeamVersions != null) {
for (SeamVersion ver : validSeamVersions) {
- if (seamVersion.matches(ver.toString().replace(".",
- "\\.")
- + ".*")) {
+ if (seamVersion.matches(ver.toString().substring(0,1)+ ".*")) {
version.setValue(ver.toString());
break;
}
@@ -606,10 +604,15 @@
return;
} else if (!seamVersion.matches(version.getValueAsString().replace(
".", "\\.") + ".*")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- setMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
- + seamVersion + "'", IMessageProvider.WARNING); //$NON-NLS-1$
- setPageComplete(true);
- return;
+ if(seamVersion.matches(version.getValueAsString().substring(0,1)+".*")) {
+ setMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
+ + seamVersion + "'", IMessageProvider.WARNING); //$NON-NLS-1$
+ } else {
+ setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
+ + seamVersion + "'"); //$NON-NLS-1$
+ setPageComplete(false);
+ return;
+ }
}
Map errors = ValidatorFactory.JBOSS_SEAM_HOME_FOLDER_VALIDATOR
17 years
JBoss Tools SVN: r6683 - in trunk/seam: plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-03-04 19:28:14 -0500 (Tue, 04 Mar 2008)
New Revision: 6683
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
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/SeamActionWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1322
fix for compilation errors
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -251,4 +251,5 @@
* Selected Server
*/
String JBOSS_AS_TARGET_RUNTIME = "seam.project.deployment.runtime"; //$NON-NLS-1$
+
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -320,7 +320,7 @@
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder,"src/Authenticator.java"), //$NON-NLS-1$
- new File(project.getLocation().toFile(),source.getFullPath().removeFirstSegments(1)+"/action/" + model.getProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString().replace('.', '/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new File(project.getLocation().toFile(),source.getFullPath().removeFirstSegments(1)+"/action/" + model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new FilterSetCollection(filtersFilterSet), true);
// Needed to make sure /dev is picked up by test, so need seam.properties.
@@ -393,7 +393,7 @@
// *******************************************************************************************
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder,"src/Authenticator.java"), //$NON-NLS-1$
- new File(ejb,"ejbModule/" + model.getProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString().replace('.', '/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new File(ejb,"ejbModule/" + model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new FilterSetCollection(filtersFilterSet), true);
AntCopyUtils.copyFileToFile(
persistenceFile,
@@ -545,7 +545,7 @@
* @param project
* @param model
*/
- private void createSeamProjectPreferenes(final IProject project,
+ protected void createSeamProjectPreferenes(final IProject project,
final IDataModel model) {
IScopeContext projectScope = new ProjectScope(project);
IEclipsePreferences prefs = projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
@@ -556,7 +556,7 @@
prefs.put(SEAM_CONNECTION_PROFILE,model.getProperty(SEAM_CONNECTION_PROFILE).toString());
- prefs.put(SESION_BEAN_PACKAGE_NAME, model.getProperty(SESION_BEAN_PACKAGE_NAME).toString());
+ prefs.put(SESSION_BEAN_PACKAGE_NAME, model.getProperty(SESSION_BEAN_PACKAGE_NAME).toString());
prefs.put(ENTITY_BEAN_PACKAGE_NAME, model.getProperty(ENTITY_BEAN_PACKAGE_NAME).toString());
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -105,6 +105,8 @@
return EMPTY_STRING;
} else if (DB_DEFAULT_SCHEMA_NAME.equals(propertyName)) {
return EMPTY_STRING;
+ } else if(JBOSS_AS_TARGET_RUNTIME.equals(propertyName)) {
+ return EMPTY_STRING;
}
return super.getDefaultProperty(propertyName);
}
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 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -136,7 +136,7 @@
private IFieldEditor sessionBeanPkgNameditor = IFieldEditorFactory.INSTANCE
.createTextEditor(
- ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME,
+ ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_SESSION_BEAN_PACKAGE_NAME, ""); //$NON-NLS-1$
private IFieldEditor entityBeanPkgNameditor = IFieldEditorFactory.INSTANCE
@@ -685,12 +685,14 @@
final String deploymentType = value.toString();
if(!ISeamFacetDataModelProperties.DEPLOY_AS_WAR.equals(deploymentType)) {
- String runtimeName = model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME).toString();
- IRuntime rt = RuntimeManager.getRuntime(runtimeName);
- if(!rt.supports(EJB_30) || !rt.supports(EAR_50)) {
- return ValidatorFactory.createErrormessage(
- propertyName,
- NLS.bind(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CANNOT_USE_SELECTED_DEPLOYMENT6 , new String[]{deploymentType.toUpperCase(),runtimeName}));
+ Object runtimeName = model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME);
+ if(runtimeName!=null) {
+ IRuntime rt = RuntimeManager.getRuntime(runtimeName.toString());
+ if(!rt.supports(EJB_30) || !rt.supports(EAR_50)) {
+ return ValidatorFactory.createErrormessage(
+ propertyName,
+ NLS.bind(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CANNOT_USE_SELECTED_DEPLOYMENT6 , new String[]{deploymentType.toUpperCase(),runtimeName.toString()}));
+ }
}
}
return ValidatorFactory.NO_ERRORS;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -75,7 +75,7 @@
// initialize war files mapping
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/ActionJavaBean.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/test/ActionTest.java", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_TEST_PROJECT_LOCATION_PATH + "}/test-src/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -89,10 +89,10 @@
// initialize ear files mapping
ACTION_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/ActionBean.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/Action.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/test/ActionTest.java", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_TEST_PROJECT_LOCATION_PATH + "}/test-src/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -105,8 +105,8 @@
vars.put(IParameter.SEAM_PROJECT_SRC_MODEL,seamPrjSet.getModelFolder().getLocation().toFile().toString());
vars.put(IParameter.SEAM_EJB_PROJECT_LOCATION_PATH,seamPrjSet.getEjbProject()!=null?seamPrjSet.getEjbProject().getLocation().toFile().toString():"");
vars.put(IParameter.SEAM_TEST_PROJECT_LOCATION_PATH,seamPrjSet.getTestProject().getLocation().toFile().toString());
- vars.put(IParameter.SESION_BEAN_PACKAGE_PATH, actionFolder.replace('.','/'));
- vars.put(IParameter.SESION_BEAN_PACKAGE_NAME, actionFolder);
+ vars.put(IParameter.SESSION_BEAN_PACKAGE_PATH, actionFolder.replace('.','/'));
+ vars.put(IParameter.SESSION_BEAN_PACKAGE_NAME, actionFolder);
vars.put(IParameter.TEST_CASES_PACKAGE_PATH, testFolder.replace('.','/'));
vars.put(IParameter.TEST_CASES_PACKAGE_NAME, testFolder);
vars.put(IParameter.ENTITY_BEAN_PACKAGE_PATH, entityFolder.replace('.','/'));
@@ -175,7 +175,7 @@
}
protected String getSessionBeanPackageName(IEclipsePreferences seamFacetPrefs, Map<String, INamedElement> wizardParams) {
- return seamFacetPrefs.get(IParameter.SESION_BEAN_PACKAGE_NAME, "");
+ return seamFacetPrefs.get(IParameter.SESSION_BEAN_PACKAGE_NAME, "");
}
protected String getEntityBeanPackageName(IEclipsePreferences seamFacetPrefs, Map<String, INamedElement> wizardParams) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -369,7 +369,7 @@
}
protected String getDefaultPackageName(IEclipsePreferences seamFacetPrefs) {
- return seamFacetPrefs.get(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, "");
+ return seamFacetPrefs.get(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, "");
}
protected void setSeamProjectNameData(String projectName) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -66,7 +66,7 @@
// initialize war files mapping
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/ConversationJavaBean.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/view/conversation.xhtml", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_PROJECT_WEBCONTENT_PATH + "}/${" + IParameter.SEAM_PAGE_NAME +"}.xhtml"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -74,10 +74,10 @@
// initialize ear files mapping
ACTION_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/ConversationBean.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/Conversation.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_EAR_MAPPING.add(ACTION_WAR_MAPPING.get(1));
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -90,10 +90,10 @@
"${" + IParameter.SEAM_PROJECT_SRC_MODEL + "}/${" + ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_ENTITY_CLASS_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/EntityHome.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_ENTITY_CLASS_NAME +"}Home.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_ENTITY_CLASS_NAME +"}Home.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/EntityList.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_ENTITY_CLASS_NAME +"}List.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_ENTITY_CLASS_NAME +"}List.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/view/edit.xhtml", //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -71,7 +71,7 @@
static {
FORM_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/FormActionJavaBean.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
FORM_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/test/FormTest.java", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_TEST_PROJECT_LOCATION_PATH + "}/test-src/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -85,10 +85,10 @@
// initialize ear files mapping
FORM_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/FormActionBean.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_BEAN_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
FORM_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/FormAction.java", //$NON-NLS-1$ //$NON-NLS-2$
- "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ "${" + IParameter.SEAM_PROJECT_SRC_ACTION + "}/${" + ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_LOCAL_INTERFACE_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
FORM_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/test/FormTest.java", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_TEST_PROJECT_LOCATION_PATH + "}/test-src/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -223,7 +223,7 @@
// foreach="entity"/>
IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamPreferences(project);
- final String actionpackage = seamFacetPrefs.get(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, "");
+ final String actionpackage = seamFacetPrefs.get(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, "");
final String actionDir = actionpackage.replace('.','/');
ISeamProject sprj = (ISeamProject)project.getNature(ISeamProject.NATURE_ID);
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -138,7 +138,7 @@
config.setBooleanProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS, true);
config.setBooleanProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY, false);
config.setStringProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, deployType);
- config.setStringProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, "org.session.beans");
+ config.setStringProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, "org.session.beans");
config.setStringProperty(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "org.entity.beans");
config.setStringProperty(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, "org.test.beans");
config.setStringProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE, "noop-connection");
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java 2008-03-05 00:27:05 UTC (rev 6682)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java 2008-03-05 00:28:14 UTC (rev 6683)
@@ -42,7 +42,7 @@
public void testCreateCustomProject() throws CoreException, IOException {
IDataModel createSeamDataModel = createSeamDataModel("war");
- createSeamDataModel.setProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, "x.y.z");
+ createSeamDataModel.setProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, "x.y.z");
final IFacetedProject fproj = createSeamProject("customProject",createSeamDataModel);
17 years
JBoss Tools SVN: r6682 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-03-04 19:27:05 -0500 (Tue, 04 Mar 2008)
New Revision: 6682
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1786
error message changed to warning when selected seam not compatible with selected seam version
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2008-03-04 18:02:59 UTC (rev 6681)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2008-03-05 00:27:05 UTC (rev 6682)
@@ -28,6 +28,7 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
@@ -599,14 +600,15 @@
setPageComplete(false);
return;
} else if ("".equals(seamVersion)) { //$NON-NLS-1$
- setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER);
- setPageComplete(false);
+ setMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_CANNOT_OBTAIN_SEAM_VERSION_NUMBER,
+ IMessageProvider.WARNING);
+ setPageComplete(true);
return;
} else if (!seamVersion.matches(version.getValueAsString().replace(
".", "\\.") + ".*")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- setErrorMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
- + seamVersion + "'"); //$NON-NLS-1$
- setPageComplete(false);
+ setMessage(SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_THE_SELECTED_SEAM_APPEARS_TO_BE_OF_INCOMATIBLE_VERSION
+ + seamVersion + "'", IMessageProvider.WARNING); //$NON-NLS-1$
+ setPageComplete(true);
return;
}
17 years
JBoss Tools SVN: r6681 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-03-04 13:02:59 -0500 (Tue, 04 Mar 2008)
New Revision: 6681
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1322 New settings are created for new projects that we create by New Seam Web Project.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2008-03-04 14:44:06 UTC (rev 6680)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2008-03-04 18:02:59 UTC (rev 6681)
@@ -15,34 +15,50 @@
/**
* Seam facet properties collected in Seam Web Project Wizard.
- * Only properties listed below are saved in Seam WebProject Preferences:
+ * Only properties listed below are saved in Seam WebProject Preferences:
+ * ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER,
* ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME,
- * ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME
- * ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE
- * ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS
- * ISeamFacetDataModelProperties.SEAM_TEST_PROJECT
- * ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME
- * ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME
- * ISeamFacetDataModelProperties.SEAM_EJB_PROJECT
+ * ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER,
+ * ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME,
+ * ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE,
+ * ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
+ * ISeamFacetDataModelProperties.SEAM_TEST_PROJECT,
+ * ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
+ * ISeamFacetDataModelProperties.SEAM_SETTINGS_VERSION,
+ * ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER,
+ * ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME,
+ * ISeamFacetDataModelProperties.TEST_CREATING,
+ * ISeamFacetDataModelProperties.SEAM_EJB_PROJECT,
* ISeamFacetDataModelProperties.SEAM_EAR_PROJECT
* @author eskimo
- *
*/
public interface ISeamFacetDataModelProperties extends IActionConfigFactory {
-
+
// Seam Preferences names constants
-
+
/**
+ * Source folder used session objects: actions, forms, conversations, beans
+ * web pages backing beans
+ */
+ String SESSION_BEAN_SOURCE_FOLDER = "action.sources"; //$NON-NLS-1$
+
+ /**
* Package name used session objects: actions, forms, conversations, beans
* web pages backing beans
*/
- String SESION_BEAN_PACKAGE_NAME = "action.package"; //$NON-NLS-1$
+ String SESSION_BEAN_PACKAGE_NAME = "action.package"; //$NON-NLS-1$
/**
+ * Source folder used entity beans: actions, forms, conversations, beans
+ * web pages backing beans
+ */
+ String ENTITY_BEAN_SOURCE_FOLDER = "model.sources"; //$NON-NLS-1$
+
+ /**
* Package name for Entity Beans classes
*/
String ENTITY_BEAN_PACKAGE_NAME = "model.package"; //$NON-NLS-1$
-
+
/**
* Connection profile name
*/
@@ -57,7 +73,7 @@
* Test project name that was created for Seam Web Project
*/
String SEAM_TEST_PROJECT = "seam.test.project"; //$NON-NLS-1$
-
+
/**
* Seam runtime name that should be used to create seam artifacts:
* forms, actions, conversations and entities
@@ -65,29 +81,50 @@
String SEAM_RUNTIME_NAME = "seam.runtime.name"; //$NON-NLS-1$
/**
+ * Seam settings version.
+ */
+ String SEAM_SETTINGS_VERSION = "seam.project.settings.version";
+
+ /**
+ * Seam settings version 1.1.
+ */
+ String SEAM_SETTINGS_VERSION_1_1 = "1.1";
+
+ /**
+ * Source folder where tests for seam artifacts should be placed inside the
+ * test project
+ */
+ String TEST_SOURCE_FOLDER = "test.sources"; //$NON-NLS-1$
+
+ /**
* Package where tests for seam artifacts should be placed inside the
* test project
*/
String TEST_CASES_PACKAGE_NAME = "test.package"; //$NON-NLS-1$
-
+
/**
+ * This flag indicates that we should create seam tests.
+ * Can be "true" or "false".
+ */
+ String TEST_CREATING = "seam.test.creating"; //$NON-NLS-1$
+
+ /**
* Ejb project name created from Seam Web Project in EAR deployment configuration
*/
String SEAM_EJB_PROJECT = "seam.ejb.project"; //$NON-NLS-1$
-
+
/**
* Ear project name created for Seam Web Project in EAR deployment configuration
*/
String SEAM_EAR_PROJECT = "seam.ear.project"; //$NON-NLS-1$
+ // Seam Facet Wizard Page parameters constants
- // Seam Facet Wizard Page parameters constants
-
/**
* Project name token
*/
String SEAM_PROJECT_NAME = "project.name"; //$NON-NLS-1$
-
+
/**
* Selected Seam Project
*/
@@ -97,37 +134,37 @@
* Path to JBoss AS server
*/
String JBOSS_AS_HOME = "jboss.home"; //$NON-NLS-1$
-
+
/**
* Selected Database type
*/
String DB_TYPE = "database.type"; //$NON-NLS-1$
-
+
/**
* Selected hibernate dialect
*/
String HIBERNATE_DIALECT = "hibernate.dialect"; //$NON-NLS-1$
-
+
/**
* JDBC driver class name token
*/
String JDBC_DRIVER_CLASS_NAME = "hibernate.connection.driver_class"; //$NON-NLS-1$
-
+
/**
* JDBC Connection URL token
*/
String JDBC_URL_FOR_DB = "hibernate.connection.url"; //$NON-NLS-1$
-
+
/**
* Connection user name token
*/
String DB_USER_NAME = "hibernate.connection.username"; //$NON-NLS-1$
-
+
/**
* Connection user name password
*/
String DB_USER_PASSWORD = "hibernate.connection.password"; //$NON-NLS-1$
-
+
/**
* Schema name
*/
@@ -140,42 +177,42 @@
*
*/
String DB_DEFAULT_SCHEMA_NAME = "hibernate.default_schema"; //$NON-NLS-1$
-
+
/**
* Catalog name
*/
String DB_CATALOG_NAME = "catalog.property"; //$NON-NLS-1$
-
+
/**
* If it is empty catalog.property is empty
* If is not empty catalog.property should be set to
* 
 <property name="hibernate.default_catalog" value="${hibernate.default_catalog}"/>
*/
String DB_DEFAULT_CATALOG_NAME = "hibernate.default_catalog"; //$NON-NLS-1$
-
+
/**
* DB tables already exists in database check box value
*/
String DB_ALREADY_EXISTS = "database.exists"; //$NON-NLS-1$
-
+
/**
* Recreate database tables and data on deploy check box value
*/
String RECREATE_TABLES_AND_DATA_ON_DEPLOY = "database.drop"; //$NON-NLS-1$
-
+
/**
* TODO
*/
String HIBERNATE_HBM2DDL_AUTO = "hibernate.hbm2ddl.auto"; //$NON-NLS-1$
-
+
/**
* Driver file name
*/
String JDBC_DRIVER_JAR_PATH = "driver.file"; //$NON-NLS-1$
-
+
// TODO: should be moved to org.jboss.tools.seam.ui.wizard.IParameter
// why is this a property when it is always derivable from sesion_bean_package_name ?
- String SESION_BEAN_PACKAGE_PATH = "action.package.path"; //$NON-NLS-1$
+ String SESSION_BEAN_PACKAGE_PATH = "action.package.path"; //$NON-NLS-1$
// TODO: should be moved to org.jboss.tools.seam.ui.wizard.IParameter
// why is this a property when it is always derivable from entity_bean_package_name ?
@@ -189,30 +226,29 @@
* Selected Seam Runtime home folder
*/
String JBOSS_SEAM_HOME = "seam.home.folder"; //$NON-NLS-1$
-
+
/**
* Seam project web contents root folder
*/
String WEB_CONTENTS_FOLDER = "seam.project.web.root.folder"; //$NON-NLS-1$
-
+
/**
* WAR deployment constant
*/
String DEPLOY_AS_WAR = "war"; //$NON-NLS-1$
-
+
/**
* EAR deployment constant
*/
String DEPLOY_AS_EAR = "ear"; //$NON-NLS-1$
-
+
/**
* Selected Server Runtime
*/
String JBOSS_AS_TARGET_SERVER = "seam.project.deployment.target"; //$NON-NLS-1$
-
+
/**
* Selected Server
*/
String JBOSS_AS_TARGET_RUNTIME = "seam.project.deployment.runtime"; //$NON-NLS-1$
-
-}
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-03-04 14:44:06 UTC (rev 6680)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-03-04 18:02:59 UTC (rev 6681)
@@ -11,17 +11,26 @@
package org.jboss.tools.seam.internal.core.project.facet;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILogListener;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.osgi.service.prefs.BackingStoreException;
/**
*
@@ -96,7 +105,6 @@
* @see org.eclipse.wst.common.project.facet.core.IActionConfigFactory#create()
*/
public Object create() throws CoreException {
- // TODO Auto-generated method stub
return null;
}
@@ -105,4 +113,56 @@
errorOccurs = true;
}
}
-}
+
+ /**
+ * @param project
+ * @param model
+ */
+ protected void createSeamProjectPreferenes(final IProject project,
+ final IDataModel model) {
+ IScopeContext projectScope = new ProjectScope(project);
+ IEclipsePreferences prefs = projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
+
+ prefs.put(JBOSS_AS_DEPLOY_AS, model.getProperty(JBOSS_AS_DEPLOY_AS).toString());
+ prefs.put(SEAM_SETTINGS_VERSION, SEAM_SETTINGS_VERSION_1_1);
+ prefs.put(SEAM_RUNTIME_NAME, model.getProperty(SEAM_RUNTIME_NAME).toString());
+ prefs.put(SEAM_CONNECTION_PROFILE, model.getProperty(SEAM_CONNECTION_PROFILE).toString());
+ prefs.put(SESSION_BEAN_PACKAGE_NAME, model.getProperty(SESSION_BEAN_PACKAGE_NAME).toString());
+ prefs.put(ENTITY_BEAN_PACKAGE_NAME, model.getProperty(ENTITY_BEAN_PACKAGE_NAME).toString());
+ prefs.put(TEST_CASES_PACKAGE_NAME, model.getProperty(TEST_CASES_PACKAGE_NAME).toString());
+ prefs.put(TEST_CREATING, "true");
+
+ String testSrcPath = project.getFullPath().removeLastSegments(1).append(project.getName() + "-test").append("test-src").toString();
+ prefs.put(TEST_SOURCE_FOLDER, testSrcPath);
+
+ prefs.put(SEAM_TEST_PROJECT,
+ model.getProperty(SEAM_TEST_PROJECT)==null?
+ "":model.getProperty(SEAM_TEST_PROJECT).toString()); //$NON-NLS-1$
+
+ if(DEPLOY_AS_EAR.equals(model.getProperty(JBOSS_AS_DEPLOY_AS))) {
+ prefs.put(SEAM_EJB_PROJECT,
+ model.getProperty(SEAM_EJB_PROJECT)==null?
+ "":model.getProperty(SEAM_EJB_PROJECT).toString()); //$NON-NLS-1$
+
+ prefs.put(SEAM_EAR_PROJECT,
+ model.getProperty(SEAM_EAR_PROJECT)==null?
+ "":model.getProperty(SEAM_EAR_PROJECT).toString()); //$NON-NLS-1$
+
+ String srcPath = project.getFullPath().removeLastSegments(1).append(project.getName() + "-ejb").append("ejbModule").toString();
+ prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcPath);
+ prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcPath);
+ } else {
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IPath srcRootFolder = component.getRootFolder().getFolder(new Path("/WEB-INF/classes")).getUnderlyingFolder().getParent().getFullPath(); //$NON-NLS-1$
+
+ prefs.put(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER, srcRootFolder.append("model").toString());
+ prefs.put(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER, srcRootFolder.append("action").toString());
+ }
+
+ try {
+ prefs.flush();
+ } catch (BackingStoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2008-03-04 14:44:06 UTC (rev 6680)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2008-03-04 18:02:59 UTC (rev 6681)
@@ -63,9 +63,13 @@
names.add(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH);
// Code generation group
- names.add(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME);
+ names.add(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER);
+ names.add(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME);
+ names.add(ISeamFacetDataModelProperties.ENTITY_BEAN_SOURCE_FOLDER);
names.add(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME);
+ names.add(ISeamFacetDataModelProperties.TEST_SOURCE_FOLDER);
names.add(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME);
+ names.add(ISeamFacetDataModelProperties.TEST_CREATING);
names.add(ISeamFacetDataModelProperties.WEB_CONTENTS_FOLDER);
names.add(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME);
names.add(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-03-04 14:44:06 UTC (rev 6680)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-03-04 18:02:59 UTC (rev 6681)
@@ -31,7 +31,6 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
import org.eclipse.wst.common.componentcore.ComponentCore;
@@ -61,12 +60,12 @@
*
**/
public static final String DEV_WAR_PROFILE = "dev-war"; //$NON-NLS-1$
-
+
/**
*
*/
public static final String DEV_EAR_PROFILE = "dev"; //$NON-NLS-1$
-
+
/**
*
*/
@@ -76,7 +75,7 @@
*
*/
public static final String TEST_EAR_PROFILE = "test"; //$NON-NLS-1$
-
+
/**
*
*/
@@ -119,7 +118,7 @@
.include("thirdparty-all\\.jar") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
-
+
/**
*
*/
@@ -180,7 +179,7 @@
.exclude(".*/.*\\.ftl") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
-
+
/**
*
*/
@@ -252,10 +251,10 @@
IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
final IVirtualFolder srcRootFolder = component.getRootFolder().getFolder(new Path("/WEB-INF/classes")); //$NON-NLS-1$
IContainer webRootFolder = webRootVirtFolder.getUnderlyingFolder();
-
+
model.setProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, project.getName());
model.setProperty(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, project.getName() + "-test"); //$NON-NLS-1$
-
+
Boolean dbExists = (Boolean) model.getProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS);
Boolean dbRecreate = (Boolean) model.getProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY);
if (!dbExists && !dbRecreate) {
@@ -265,10 +264,9 @@
} else if (dbRecreate) {
model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "create-drop"); //$NON-NLS-1$
}
-
+
final String consoleName = isWarConfiguration(model) ? project.getName() : project.getName() + "-ejb";
-
-
+
final File webContentFolder = webRootFolder.getLocation().toFile();
final File webInfFolder = new File(webContentFolder, "WEB-INF"); //$NON-NLS-1$
final File webInfClasses = new File(webInfFolder, "classes"); //$NON-NLS-1$
@@ -280,29 +278,29 @@
final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
final String seamHomePath = selectedRuntime.getHomeDir();
-
+
final File seamHomeFolder = new File(seamHomePath);
final File seamLibFolder = new File(seamHomePath, SEAM_LIB_RELATED_PATH);
final File seamGenResFolder = new File(seamHomePath, "seam-gen/resources"); //$NON-NLS-1$
final File seamGenResMetainfFolder = new File(seamGenResFolder, "META-INF"); //$NON-NLS-1$
-
+
final File droolsLibFolder = new File(seamHomePath, DROOLS_LIB_SEAM_RELATED_PATH);
final File seamGenHomeFolder = new File(seamHomePath, "seam-gen"); //$NON-NLS-1$
final File seamGenViewSource = new File(seamGenHomeFolder, "view"); //$NON-NLS-1$
final File dataSourceDsFile = new File(seamGenResFolder, "datasource-ds.xml"); //$NON-NLS-1$
final File componentsFile = new File(seamGenResFolder, "WEB-INF/components" + (isWarConfiguration(model) ? "-war" : "") + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
+
final File hibernateConsoleLaunchFile = new File(seamGenHomeFolder, "hibernatetools/hibernate-console.launch"); //$NON-NLS-1$
final File hibernateConsolePropsFile = new File(seamGenHomeFolder, "hibernatetools/hibernate-console.properties"); //$NON-NLS-1$
//final File hibernateConsolePref = new File(seamGenHomeFolder, "hibernatetools/.settings/org.hibernate.eclipse.console.prefs"); //$NON-NLS-1$
final File persistenceFile = new File(seamGenResFolder, "META-INF/persistence-" + (isWarConfiguration(model) ? DEV_WAR_PROFILE : DEV_EAR_PROFILE) + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
-
+
final File applicationFile = new File(seamGenResFolder, "META-INF/application.xml"); //$NON-NLS-1$
final FilterSet jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
final FilterSet projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
final FilterSet filtersFilterSet = SeamFacetFilterSetFactory.createFiltersFilterSet(model);
-
+
// ****************************************************************
// Copy view folder from seam-gen installation to WebContent folder
// ****************************************************************
@@ -310,52 +308,49 @@
final FilterSetCollection viewFilterSetCollection = new FilterSetCollection();
viewFilterSetCollection.addFilterSet(jdbcFilterSet);
viewFilterSetCollection.addFilterSet(projectFilterSet);
-
+
AntCopyUtils.copyFilesAndFolders(
seamGenViewSource,
webContentFolder,
new AntCopyUtils.FileSetFileFilter(viewFileSet),
viewFilterSetCollection,
true);
-
+
// *******************************************************************
// Copy manifest and configuration resources the same way as view
// *******************************************************************
AntCopyUtils.FileSet webInfSet = new AntCopyUtils.FileSet(JBOOS_WAR_WEBINF_SET).dir(seamGenResFolder);
-
+
AntCopyUtils.copyFileToFile(
componentsFile,
new File(webInfFolder, "components.xml"), //$NON-NLS-1$
new FilterSetCollection(projectFilterSet), true);
-
+
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder, webContentFolder, new AntCopyUtils.FileSetFileFilter(webInfSet), viewFilterSetCollection, true);
-
final FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
hibernateDialectFilterSet.addFilterSet(projectFilterSet);
hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
-
-
+
createTestProject(model, project, selectedRuntime);
// ********************************************************************************************
// Handle WAR/EAR configurations
// ********************************************************************************************
if (isWarConfiguration(model)) {
-
AntCopyUtils.FileSet webInfClassesSet = new AntCopyUtils.FileSet(JBOOS_WAR_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder, srcFolder, new AntCopyUtils.FileSetFileFilter(webInfClassesSet), viewFilterSetCollection, true);
-
+
createComponentsProperties(srcFolder, isWarConfiguration(model) ? "" : project.getName() + "-ear", false); //$NON-NLS-1$ //$NON-NLS-2$
-
+
/*AntCopyUtils.copyFileToFolder(
hibernateConsolePref,
new File(project.getLocation().toFile(),".settings"), //$NON-NLS-1$
new FilterSetCollection(projectFilterSet), true);*/
-
+
// In case of WAR configuration
AntCopyUtils.copyFiles(seamHomeFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(seamHomeFolder)));
AntCopyUtils.copyFiles(seamLibFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(seamLibFolder)));
@@ -366,20 +361,20 @@
// ********************************************************************************************
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "seam.properties"), srcFolder, true); //$NON-NLS-1$
final IContainer source = srcRootFolder.getUnderlyingFolder();
-
+
IPath actionSrcPath = new Path(source.getFullPath().removeFirstSegments(1) + "/action"); //$NON-NLS-1$
IPath modelSrcPath = new Path(source.getFullPath().removeFirstSegments(1) + "/model"); //$NON-NLS-1$
srcRootFolder.delete(IVirtualFolder.FORCE, monitor);
WtpUtils.createSourceFolder(project, actionSrcPath, source.getFullPath().removeFirstSegments(1), webRootFolder.getFullPath().removeFirstSegments(1).append("WEB-INF/dev")); //$NON-NLS-1$
WtpUtils.createSourceFolder(project, modelSrcPath, source.getFullPath().removeFirstSegments(1), null);
-
+
srcRootFolder.createLink(actionSrcPath, 0, null);
srcRootFolder.createLink(modelSrcPath, 0, null);
-
+
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
- new File(project.getLocation().toFile(), source.getFullPath().removeFirstSegments(1) + "/action/" + model.getProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new File(project.getLocation().toFile(), source.getFullPath().removeFirstSegments(1) + "/action/" + model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new FilterSetCollection(filtersFilterSet), true);
AntCopyUtils.copyFileToFile(
@@ -392,23 +387,22 @@
dataSourceDsFile,
new File(resources, project.getName() + "-ds.xml"), //$NON-NLS-1$
viewFilterSetCollection, true);
-
+
AntCopyUtils.copyFileToFile(
hibernateConsoleLaunchFile,
new File(project.getLocation().toFile(), project.getName() + ".launch"), //$NON-NLS-1$
viewFilterSetCollection, true);
-
+
AntCopyUtils.copyFileToFolder(
hibernateConsolePropsFile,
project.getLocation().toFile(),
hibernateDialectFilterSet, true);
-
- WtpUtils.setClasspathEntryAsExported(project, new Path("org.eclipse.jst.j2ee.internal.web.container"), monitor); //$NON-NLS-1$
+ WtpUtils.setClasspathEntryAsExported(project, new Path("org.eclipse.jst.j2ee.internal.web.container"), monitor); //$NON-NLS-1$
} else {
model.setProperty(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, project.getName() + "-ejb"); //$NON-NLS-1$
model.setProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, project.getName() + "-ear"); //$NON-NLS-1$
-
+
// In case of EAR configuration
AntCopyUtils.copyFiles(seamHomeFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamHomeFolder)));
AntCopyUtils.copyFiles(seamLibFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamLibFolder)));
@@ -419,7 +413,7 @@
File ejb = new File(project.getLocation().removeLastSegments(1).toFile(), model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME) + "-ejb"); //$NON-NLS-1$
ear.mkdir();
ejb.mkdir();
-
+
try {
FilterSet filterSet = new FilterSet();
filterSet.addFilter("projectName", project.getName()); //$NON-NLS-1$
@@ -431,66 +425,63 @@
filterSet.addFilter("driverJar", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
AntCopyUtils.FileSet excludeCvsSvn = new AntCopyUtils.FileSet(CVS_SVN).dir(seamGenResFolder);
-
+
AntCopyUtils.copyFilesAndFolders(
new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ejb"), //$NON-NLS-1$
ejb, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
-
+
// *******************************************************************************************
// Copy sources to ejb project in case of EAR configuration
// *******************************************************************************************
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
- new File(ejb, "ejbModule/" + model.getProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new File(ejb, "ejbModule/" + model.getProperty(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new FilterSetCollection(filtersFilterSet), true);
AntCopyUtils.copyFileToFile(
persistenceFile,
new File(ejb, "ejbModule/META-INF/persistence.xml"), //$NON-NLS-1$
viewFilterSetCollection, true);
-
+
createComponentsProperties(new File(ejb, "ejbModule"), isWarConfiguration(model) ? "" : project.getName() + "-ear", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
+
AntCopyUtils.FileSet ejbSrcResourcesSet = new AntCopyUtils.FileSet(JBOOS_EJB_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
seamGenResFolder, new File(ejb, "ejbModule"), new AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true); //$NON-NLS-1$
-
-
+
// ********************************************************************************************
// Copy seam project indicator
// ********************************************************************************************
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "seam.properties"), new File(ejb, "ejbModule/"), true); //$NON-NLS-1$ //$NON-NLS-2$
-
-
AntCopyUtils.copyFileToFolder(
new File(seamGenResFolder, "META-INF/ejb-jar.xml"), //$NON-NLS-1$
new File(ejb, "ejbModule/META-INF/"), //$NON-NLS-1$
viewFilterSetCollection, true);
-
+
/*AntCopyUtils.copyFileToFolder(
hibernateConsolePref,
new File(ejb,".settings"), //$NON-NLS-1$
new FilterSetCollection(projectFilterSet), true);*/
-
+
FilterSet ejbFilterSet = new FilterSet();
ejbFilterSet.addFilter("projectName", ejb.getName()); //$NON-NLS-1$
-
+
AntCopyUtils.copyFileToFile(
hibernateConsoleLaunchFile,
new File(ejb, ejb.getName() + ".launch"), //$NON-NLS-1$
new FilterSetCollection(ejbFilterSet), true);
-
+
AntCopyUtils.copyFileToFolder(
hibernateConsolePropsFile,
ejb,
hibernateDialectFilterSet, true);
-
+
File earContentsFolder = new File(ear, "EarContent"); //$NON-NLS-1$
FilterSet earFilterSet = new FilterSet();
earFilterSet.addFilter("projectName", ear.getName() + ".ear"); //$NON-NLS-1$ //$NON-NLS-2$
-
+
AntCopyUtils.copyFileToFolder(
new File(seamGenResFolder, "META-INF/jboss-app.xml"), //$NON-NLS-1$
new File(earContentsFolder, "META-INF"), //$NON-NLS-1$
@@ -501,23 +492,21 @@
new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ear"), //$NON-NLS-1$
ear, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
-
+
// Fill ear contents
AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)));
AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)));
AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
AntCopyUtils.copyFiles(seamGenResFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)));
-
-
+
File resources = new File(ear, "resources");
AntCopyUtils.copyFileToFile(
dataSourceDsFile,
new File(resources, project.getName() + "-ds.xml"), //$NON-NLS-1$ //$NON-NLS-2$
viewFilterSetCollection, true);
-
+
try {
-
File[] earJars = earContentsFolder.listFiles(new FilenameFilter() {
/* (non-Javadoc)
* @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
@@ -530,7 +519,7 @@
for (File file : earJars) {
earJarsStr += " " + file.getName() + " \n"; //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
FilterSetCollection manifestFilterCol = new FilterSetCollection(projectFilterSet);
FilterSet manifestFilter = new FilterSet();
manifestFilter.addFilter("earLibs", earJarsStr); //$NON-NLS-1$
@@ -541,20 +530,18 @@
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
-
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
}
ClasspathHelper.addClasspathEntries(project, fv);
-
+
createSeamProjectPreferenes(project, model);
-
EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
toggleHibernateOnProject(project, consoleName);
-
+
project.refreshLocal(IResource.DEPTH_INFINITE, monitor);
String wsPath = project.getLocation().removeLastSegments(1)
.toFile().getAbsoluteFile().getPath();
@@ -562,26 +549,22 @@
IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
if (!isWarConfiguration(model)) {
-
IProject ejbProjectToBeImported = wsRoot.getProject(project.getName() + "-ejb");
ResourcesUtils.importExistingProject(ejbProjectToBeImported, wsPath + "/" + project.getName() + "-ejb", project.getName() + "-ejb");
toggleHibernateOnProject(ejbProjectToBeImported, consoleName);
IProjectFacet sf = ProjectFacetsManager.getProjectFacet("jst.ejb");
IProjectFacetVersion pfv = ProjectFacetsManager.create(ejbProjectToBeImported).getInstalledVersion(sf);
ClasspathHelper.addClasspathEntries(ejbProjectToBeImported, pfv);
-
+
IProject earProjectToBeImported = wsRoot.getProject(project.getName() + "-ear");
ResourcesUtils.importExistingProject(earProjectToBeImported, wsPath + "/" + project.getName() + "-ear", project.getName() + "-ear");
-
}
-
+
IProject testProjectToBeImported = wsRoot.getProject(project.getName() + "-test");
ResourcesUtils.importExistingProject(testProjectToBeImported, wsPath + "/" + project.getName() + "-test", project.getName() + "-test");
toggleHibernateOnProject(testProjectToBeImported, consoleName);
-
}
-
/**
*
* @param model
@@ -590,121 +573,78 @@
public static boolean isWarConfiguration(IDataModel model) {
return "war".equals(model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS)); //$NON-NLS-1$
}
-
-
- /**
- * @param project
- * @param model
- */
- private void createSeamProjectPreferenes(final IProject project,
- final IDataModel model) {
- IScopeContext projectScope = new ProjectScope(project);
- IEclipsePreferences prefs = projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
-
- prefs.put(JBOSS_AS_DEPLOY_AS, model.getProperty(JBOSS_AS_DEPLOY_AS).toString());
-
- prefs.put(SEAM_RUNTIME_NAME, model.getProperty(SEAM_RUNTIME_NAME).toString());
-
- prefs.put(SEAM_CONNECTION_PROFILE, model.getProperty(SEAM_CONNECTION_PROFILE).toString());
-
- prefs.put(SESION_BEAN_PACKAGE_NAME, model.getProperty(SESION_BEAN_PACKAGE_NAME).toString());
-
- prefs.put(ENTITY_BEAN_PACKAGE_NAME, model.getProperty(ENTITY_BEAN_PACKAGE_NAME).toString());
-
- prefs.put(TEST_CASES_PACKAGE_NAME, model.getProperty(TEST_CASES_PACKAGE_NAME).toString());
-
- prefs.put(SEAM_TEST_PROJECT,
- model.getProperty(SEAM_TEST_PROJECT) == null
- ? "" : model.getProperty(SEAM_TEST_PROJECT).toString()); //$NON-NLS-1$
-
- if (DEPLOY_AS_EAR.equals(model.getProperty(JBOSS_AS_DEPLOY_AS))) {
- prefs.put(SEAM_EJB_PROJECT,
- model.getProperty(SEAM_EJB_PROJECT) == null
- ? "" : model.getProperty(SEAM_EJB_PROJECT).toString()); //$NON-NLS-1$
-
- prefs.put(SEAM_EAR_PROJECT,
- model.getProperty(SEAM_EAR_PROJECT) == null
- ? "" : model.getProperty(SEAM_EAR_PROJECT).toString()); //$NON-NLS-1$
+
+ private void createTestProject(IDataModel model, IProject seamWebProject, SeamRuntime seamRuntime) {
+ String projectName = model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME).toString();
+ File testProjectDir = new File(seamWebProject.getLocation().removeLastSegments(1).toFile(), projectName + "-test"); //$NON-NLS-1$
+ testProjectDir.mkdir();
+
+ IVirtualComponent component = ComponentCore.createComponent(seamWebProject);
+ IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
+
+ File testLibDir = new File(testProjectDir, "lib"); //$NON-NLS-1$
+ File embededEjbDir = new File(testProjectDir, "embedded-ejb"); //$NON-NLS-1$
+ File testSrcDir = new File(testProjectDir, "test-src"); //$NON-NLS-1$
+ String seamGenResFolder = seamRuntime.getResourceTemplatesDir();
+ File persistenceFile = new File(seamGenResFolder , "META-INF/persistence-" + (isWarConfiguration(model) ? TEST_WAR_PROFILE:TEST_EAR_PROFILE) + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
+ File jbossBeansFile = new File(seamGenResFolder , "META-INF/jboss-beans.xml"); //$NON-NLS-1$
+ FilterSet filterSet = new FilterSet();
+ filterSet.addFilter("projectName", projectName); //$NON-NLS-1$
+ filterSet.addFilter("runtimeName", WtpUtils.getServerRuntimeName(seamWebProject)); //$NON-NLS-1$
+ filterSet.addFilter("webRootFolder", webRootVirtFolder.getUnderlyingFolder().getFullPath().removeFirstSegments(1).toString()); //$NON-NLS-1$
+
+ final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
+ final String seamHomePath = selectedRuntime.getHomeDir();
+
+ AntCopyUtils.FileSet includeLibs
+ = new AntCopyUtils.FileSet(JBOSS_TEST_LIB_FILESET)
+ .dir(new File(seamRuntime.getHomeDir(), "lib")); //$NON-NLS-1$
+ File[] libs = includeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(includeLibs));
+ StringBuffer testLibraries = new StringBuffer();
+
+ for (File file : libs) {
+ testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file.getName() + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
+ StringBuffer requiredProjects = new StringBuffer();
+ requiredProjects.append(
+ "\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/" + seamWebProject.getName() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
+ if (!isWarConfiguration(model)) {
+ requiredProjects.append(
+ "\n\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/" + seamWebProject.getName() + "-ejb\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ filterSet.addFilter("testLibraries", testLibraries.toString()); //$NON-NLS-1$
+ filterSet.addFilter("requiredProjects", requiredProjects.toString()); //$NON-NLS-1$
+ File testTemplateDir = null;
try {
- prefs.flush();
- } catch (BackingStoreException e) {
+ testTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "test"); //$NON-NLS-1$
+ } catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
+ return;
}
- }
+ AntCopyUtils.FileSet excludeCvsSvn
+ = new AntCopyUtils.FileSet(CVS_SVN).dir(testTemplateDir);
- private void createTestProject(IDataModel model, IProject seamWebProject, SeamRuntime seamRuntime) {
- String projectName = model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME).toString();
- File testProjectDir = new File(seamWebProject.getLocation().removeLastSegments(1).toFile(), projectName + "-test"); //$NON-NLS-1$
- testProjectDir.mkdir();
-
- IVirtualComponent component = ComponentCore.createComponent(seamWebProject);
- IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
-
- File testLibDir = new File(testProjectDir, "lib"); //$NON-NLS-1$
- File embededEjbDir = new File(testProjectDir, "embedded-ejb"); //$NON-NLS-1$
- File testSrcDir = new File(testProjectDir, "test-src"); //$NON-NLS-1$
- String seamGenResFolder = seamRuntime.getResourceTemplatesDir();
- File persistenceFile = new File(seamGenResFolder , "META-INF/persistence-" + (isWarConfiguration(model) ? TEST_WAR_PROFILE:TEST_EAR_PROFILE) + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
- File jbossBeansFile = new File(seamGenResFolder , "META-INF/jboss-beans.xml"); //$NON-NLS-1$
- FilterSet filterSet = new FilterSet();
- filterSet.addFilter("projectName", projectName); //$NON-NLS-1$
- filterSet.addFilter("runtimeName", WtpUtils.getServerRuntimeName(seamWebProject)); //$NON-NLS-1$
- filterSet.addFilter("webRootFolder", webRootVirtFolder.getUnderlyingFolder().getFullPath().removeFirstSegments(1).toString()); //$NON-NLS-1$
-
- final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
- final String seamHomePath = selectedRuntime.getHomeDir();
-
- AntCopyUtils.FileSet includeLibs
- = new AntCopyUtils.FileSet(JBOSS_TEST_LIB_FILESET)
- .dir(new File(seamRuntime.getHomeDir(), "lib")); //$NON-NLS-1$
- File[] libs = includeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(includeLibs));
- StringBuffer testLibraries = new StringBuffer();
-
- for (File file : libs) {
- testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file.getName() + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- StringBuffer requiredProjects = new StringBuffer();
- requiredProjects.append(
- "\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/" + seamWebProject.getName() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
- if (!isWarConfiguration(model)) {
- requiredProjects.append(
- "\n\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/" + seamWebProject.getName() + "-ejb\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- filterSet.addFilter("testLibraries", testLibraries.toString()); //$NON-NLS-1$
- filterSet.addFilter("requiredProjects", requiredProjects.toString()); //$NON-NLS-1$
- File testTemplateDir = null;
- try {
- testTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "test"); //$NON-NLS-1$
- } catch (IOException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- return;
- }
- AntCopyUtils.FileSet excludeCvsSvn
- = new AntCopyUtils.FileSet(CVS_SVN).dir(testTemplateDir);
-
- AntCopyUtils.copyFilesAndFolders(
- testTemplateDir,
- testProjectDir,
- new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
- new FilterSetCollection(filterSet), true);
-
- excludeCvsSvn.dir(new File(seamRuntime.getHomeDir(), "embedded-ejb/conf")); //$NON-NLS-1$
- AntCopyUtils.copyFiles(
- new File(seamRuntime.getHomeDir(), "embedded-ejb/conf"), //$NON-NLS-1$
- embededEjbDir,
- new AntCopyUtils.FileSetFileFilter(excludeCvsSvn));
-
- AntCopyUtils.copyFiles(
- new File(seamRuntime.getHomeDir(), "lib"), //$NON-NLS-1$
- testLibDir,
- new AntCopyUtils.FileSetFileFilter(includeLibs));
-
- createComponentsProperties(testSrcDir, "", Boolean.TRUE); //$NON-NLS-1$
- }
+ AntCopyUtils.copyFilesAndFolders(
+ testTemplateDir,
+ testProjectDir,
+ new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
+ new FilterSetCollection(filterSet), true);
+ excludeCvsSvn.dir(new File(seamRuntime.getHomeDir(), "embedded-ejb/conf")); //$NON-NLS-1$
+ AntCopyUtils.copyFiles(
+ new File(seamRuntime.getHomeDir(), "embedded-ejb/conf"), //$NON-NLS-1$
+ embededEjbDir,
+ new AntCopyUtils.FileSetFileFilter(excludeCvsSvn));
+
+ AntCopyUtils.copyFiles(
+ new File(seamRuntime.getHomeDir(), "lib"), //$NON-NLS-1$
+ testLibDir,
+ new AntCopyUtils.FileSetFileFilter(includeLibs));
+
+ createComponentsProperties(testSrcDir, "", Boolean.TRUE); //$NON-NLS-1$
+ }
+
/**
*
* @param seamGenResFolder
@@ -724,7 +664,7 @@
SeamCorePlugin.getPluginLog().logError(e);
}
}
-
+
/**
*
* @param project
@@ -733,9 +673,9 @@
*/
public static boolean toggleHibernateOnProject(IProject project, String defaultConsoleName) {
IScopeContext scope = new ProjectScope(project);
-
+
Preferences node = scope.getNode("org.hibernate.eclipse.console");
-
+
if (node != null) {
node.putBoolean("hibernate3.enabled", true);
node.put("default.configuration", defaultConsoleName);
@@ -748,7 +688,7 @@
} else {
return false;
}
-
+
try {
addProjectNature(project, "org.hibernate.eclipse.console.hibernateNature", new NullProgressMonitor());
return true;
@@ -756,9 +696,8 @@
SeamCorePlugin.getDefault().logError("Could not activate Hibernate nature on project " + project.getName(), ce);
return false;
}
-
}
-
+
/**
* Add the given project nature to the given project (if it isn't already added).
*
@@ -772,7 +711,7 @@
if (monitor != null && monitor.isCanceled()) {
throw new OperationCanceledException();
}
-
+
if (!project.hasNature(nature)) {
IProjectDescription description = project.getDescription();
String[] prevNatures = description.getNatureIds();
@@ -787,5 +726,4 @@
return false;
}
}
-
-}
+}
\ No newline at end of file
17 years
JBoss Tools SVN: r6680 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-04 09:44:06 -0500 (Tue, 04 Mar 2008)
New Revision: 6680
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java
Log:
JBIDE-1448
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java 2008-03-04 14:43:58 UTC (rev 6679)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java 2008-03-04 14:44:06 UTC (rev 6680)
@@ -42,7 +42,7 @@
}
public boolean getInstalledAsString() {
- return "true".equals(installed); //$NON-NLS-1$
+ return !"false".equals(installed); //$NON-NLS-1$
}
public String getJndiName() {
@@ -71,7 +71,7 @@
}
public boolean isInstalled() {
- return "true".equals(installed); //$NON-NLS-1$
+ return !"false".equals(installed); //$NON-NLS-1$
}
public void setClassName(String className) {
17 years
JBoss Tools SVN: r6679 - trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-04 09:43:58 -0500 (Tue, 04 Mar 2008)
New Revision: 6679
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-mail.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-spring.meta
Log:
JBIDE-1448
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta 2008-03-04 13:06:12 UTC (rev 6678)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-components.meta 2008-03-04 14:43:58 UTC (rev 6679)
@@ -1133,17 +1133,19 @@
<Editor name="List"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced" name="precedence" xmlname="precedence"/>
- <XModelAttribute PROPERTIES="category=advanced" default="true"
+ <XModelAttribute PROPERTIES="category=advanced" default="default(true)"
name="installed" xmlname="installed">
<Constraint loader="ListString">
+ <value name="default(true)"/>
<value name="true"/>
<value name="false"/>
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
- <XModelAttribute PROPERTIES="category=advanced" default="false"
+ <XModelAttribute PROPERTIES="category=advanced" default="default(false)"
name="auto-create" xmlname="auto-create">
<Constraint loader="ListString">
+ <value name="default(false)"/>
<value name="true"/>
<value name="false"/>
</Constraint>
@@ -1352,9 +1354,10 @@
<Editor name="List"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced" name="method" xmlname="method"/>
- <XModelAttribute PROPERTIES="category=advanced" default="false"
+ <XModelAttribute PROPERTIES="category=advanced" default="default(false)"
name="auto-create" xmlname="auto-create">
<Constraint loader="ListString">
+ <value name="default(false)"/>
<value name="true"/>
<value name="false"/>
</Constraint>
@@ -1404,9 +1407,10 @@
<XModelAttributeReference
attributes="name,value,scope,method,auto-create,comment"
entity="SeamFactory" name="factory"/>
- <XModelAttribute PROPERTIES="category=advanced" default="false"
+ <XModelAttribute PROPERTIES="category=advanced" default="default(false)"
name="startup" xmlname="startup">
<Constraint loader="ListString">
+ <value name="default(false)"/>
<value name="true"/>
<value name="false"/>
</Constraint>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-mail.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-mail.meta 2008-03-04 13:06:12 UTC (rev 6678)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-mail.meta 2008-03-04 14:43:58 UTC (rev 6679)
@@ -205,17 +205,17 @@
<XModelAttribute PROPERTIES="category=general" name="password" xmlname="password"/>
<XModelAttribute PROPERTIES="category=general" name="host" xmlname="host"/>
<XModelAttribute PROPERTIES="category=general" name="port" xmlname="port"/>
- <XModelAttribute PROPERTIES="category=advanced" name="debug" xmlname="debug">
+ <XModelAttribute PROPERTIES="category=advanced" name="debug" xmlname="debug" default="default(false)">
<Constraint loader="ListString">
- <value/>
+ <value name="default(false)"/>
<value name="true"/>
<value name="false"/>
</Constraint>
<Editor name="ListString"/>
</XModelAttribute>
- <XModelAttribute PROPERTIES="category=advanced" name="ssl" xmlname="ssl">
+ <XModelAttribute PROPERTIES="category=advanced" name="ssl" xmlname="ssl" default="default(false)">
<Constraint loader="List">
- <value/>
+ <value name="default(false)"/>
<value name="true"/>
<value name="false"/>
</Constraint>
@@ -227,9 +227,9 @@
<Editor name="Note"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced" name="tls"
- visibility="false" xmlname="tls">
+ visibility="false" xmlname="tls" default="default(true)">
<Constraint loader="List">
- <value/>
+ <value name="default(true)"/>
<value name="true"/>
<value name="false"/>
</Constraint>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-spring.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-spring.meta 2008-03-04 13:06:12 UTC (rev 6678)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/seam-spring.meta 2008-03-04 14:43:58 UTC (rev 6679)
@@ -206,10 +206,10 @@
entity="SeamComponent" name="component"/>
<XModelAttribute PROPERTIES="category=general;save=always"
name="platform-transaction-manager" xmlname="platform-transaction-manager"/>
- <XModelAttribute PROPERTIES="category=advanced"
+ <XModelAttribute PROPERTIES="category=advanced" default="default(true)"
name="conversation-context-required" xmlname="conversation-context-required">
<Constraint loader="List">
- <value/>
+ <value name="default(true)"/>
<value name="true"/>
<value name="false"/>
</Constraint>
17 years
JBoss Tools SVN: r6678 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-03-04 08:06:12 -0500 (Tue, 04 Mar 2008)
New Revision: 6678
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java
Log:
Code adjustment
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java 2008-03-04 12:06:01 UTC (rev 6677)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfRadioSelectItemTemplate.java 2008-03-04 13:06:12 UTC (rev 6678)
@@ -79,9 +79,9 @@
// add title attribute to span
span.setAttribute(HTML.ATTR_TITLE, getTitle(sourceNode));
nsIDOMElement radio = visualDocument.createElement(HTML.TAG_INPUT);
- nsIDOMElement labelSpan = visualDocument.createElement(HTML.TAG_SPAN);
+ nsIDOMElement label = visualDocument.createElement(HTML.TAG_LABEL);
span.appendChild(radio);
- span.appendChild(labelSpan);
+ span.appendChild(label);
if (null != element) {
escape = element.getAttribute(ESCAPE);
@@ -110,10 +110,10 @@
if (null == escape || "true".equalsIgnoreCase(escape)) {
// show text as is
String itemLabel = attr.getNodeValue();
- labelSpan.appendChild(visualDocument.createTextNode(itemLabel));
+ label.appendChild(visualDocument.createTextNode(itemLabel));
} else {
// show formatted text
- VpeChildrenInfo labelSpanInfo = new VpeChildrenInfo(labelSpan);
+ VpeChildrenInfo labelSpanInfo = new VpeChildrenInfo(label);
// re-parse attribute's value
NodeList list = NodeProxyUtil.reparseAttributeValue(attr);
// add children to info
17 years
JBoss Tools SVN: r6677 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-04 07:06:01 -0500 (Tue, 04 Mar 2008)
New Revision: 6677
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1837
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2008-03-04 12:00:38 UTC (rev 6676)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2008-03-04 12:06:01 UTC (rev 6677)
@@ -55,23 +55,29 @@
final DefaultDatabaseCollector db = new DefaultDatabaseCollector();
ConsoleConfiguration consoleConfiguration = dbs.getConsoleConfiguration();
- readDatabaseSchema(monitor, db, consoleConfiguration, dbs.getReverseEngineeringStrategy());
-
- List result = new ArrayList();
-
- Iterator qualifierEntries = db.getQualifierEntries();
- while ( qualifierEntries.hasNext() ) {
- Map.Entry entry = (Map.Entry) qualifierEntries.next();
- result.add(new TableContainer((String) entry.getKey(),(List)entry.getValue()));
+ try{
+ readDatabaseSchema(monitor, db, consoleConfiguration, dbs.getReverseEngineeringStrategy());
+
+ List result = new ArrayList();
+
+ Iterator qualifierEntries = db.getQualifierEntries();
+ while ( qualifierEntries.hasNext() ) {
+ Map.Entry entry = (Map.Entry) qualifierEntries.next();
+ result.add(new TableContainer((String) entry.getKey(),(List)entry.getValue()));
+ }
+ return toArray(result.iterator(), TableContainer.class, new Comparator() {
+
+ public int compare(Object arg0, Object arg1) {
+
+ return ((TableContainer)arg0).getName().compareTo(((TableContainer)arg1).getName());
+ }
+
+ });
+ } catch (HibernateException e){
+ HibernateConsolePlugin.getDefault().logErrorMessage("Problems while reading database schema", e);
+ return new Object[]{"<Reading schema error: " + e.getMessage() + ">"};
}
- return toArray(result.iterator(), TableContainer.class, new Comparator() {
- public int compare(Object arg0, Object arg1) {
-
- return ((TableContainer)arg0).getName().compareTo(((TableContainer)arg1).getName());
- }
-
- });
}
private LazyDatabaseSchema getLazyDatabaseSchema(Object o) {
17 years
JBoss Tools SVN: r6676 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-04 07:00:38 -0500 (Tue, 04 Mar 2008)
New Revision: 6676
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenFileActionUtils.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1838
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenFileActionUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenFileActionUtils.java 2008-03-04 10:12:41 UTC (rev 6675)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenFileActionUtils.java 2008-03-04 12:00:38 UTC (rev 6676)
@@ -16,8 +16,12 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.core.PackageFragmentRoot;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
@@ -262,8 +266,22 @@
Element subelement = (Element) elements.next();
Attribute file = subelement.attribute( HIBERNATE_TAG_RESOURCE );
if (file != null) {
- resource = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(configXMLFile.getParent()).append(file.getValue()));
- if (elementInResource(consoleConfiguration, resource, element)) return resource;
+ IPackageFragmentRoot[] packageFragmentRoots;
+ try {
+ packageFragmentRoots = proj.getAllPackageFragmentRoots();
+ for (int i = 0; i < packageFragmentRoots.length && resource == null; i++) {
+ //search in source folders.
+ if (packageFragmentRoots[i].getClass() == PackageFragmentRoot.class) {
+ IPackageFragmentRoot packageFragmentRoot = packageFragmentRoots[i];
+ IPath path = packageFragmentRoot.getPath().append(file.getValue());
+ resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ }
+ }
+ if (resource != null &&
+ elementInResource(consoleConfiguration, resource, element)) return resource;
+ } catch (JavaModelException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage("Problems while getting project package fragment roots", e);
+ }
}
}
@@ -272,7 +290,8 @@
java.io.File file = files[i];
if (file != null) {
resource = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(file.getPath()));
- if (OpenFileActionUtils.elementInResource(consoleConfiguration, resource, element)) return resource;
+ if (resource != null &&
+ OpenFileActionUtils.elementInResource(consoleConfiguration, resource, element)) return resource;
}
}
}
17 years