JBoss Tools SVN: r11993 - in trunk: hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-11-24 13:31:34 -0500 (Mon, 24 Nov 2008)
New Revision: 11993
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterAttributes.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/HibernateLaunchConstants.java
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/SeamWizardUtils.java
Log:
JBIDE-3270 one-to-one in ui.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-11-24 18:28:48 UTC (rev 11992)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2008-11-24 18:31:34 UTC (rev 11993)
@@ -394,6 +394,7 @@
public static String CodeGenerationSettingsTab_console_configuration;
public static String CodeGenerationSettingsTab_create_new;
public static String CodeGenerationSettingsTab_detect_many_to_many_tables;
+ public static String CodeGenerationSettingsTab_detect_one_to_one_associations;
public static String CodeGenerationSettingsTab_detect_optimistic_lock_columns;
public static String CodeGenerationSettingsTab_do_you_want_create_reveng_xml;
public static String CodeGenerationSettingsTab_does_not_exist;
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-11-24 18:28:48 UTC (rev 11992)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2008-11-24 18:31:34 UTC (rev 11993)
@@ -386,6 +386,7 @@
CodeGenerationSettingsTab_console_configuration=Console &configuration:
CodeGenerationSettingsTab_create_new=Create &new...
CodeGenerationSettingsTab_detect_many_to_many_tables=Detect many-to-many tables
+CodeGenerationSettingsTab_detect_one_to_one_associations=Detect one-to-one associations
CodeGenerationSettingsTab_detect_optimistic_lock_columns=Detect optimistic lock columns
CodeGenerationSettingsTab_do_you_want_create_reveng_xml=Do you want to create a new reveng.xml or use an existing file ?
CodeGenerationSettingsTab_does_not_exist=\ does not exist
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-11-24 18:28:48 UTC (rev 11992)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationLaunchDelegate.java 2008-11-24 18:31:34 UTC (rev 11993)
@@ -307,6 +307,7 @@
ReverseEngineeringSettings qqsettings = new ReverseEngineeringSettings(res)
.setDefaultPackageName(attributes.getPackageName())
.setDetectManyToMany( attributes.detectManyToMany() )
+ .setDetectOneToOne( attributes.detectOneToOne() )
.setDetectOptimisticLock( attributes.detectOptimisticLock() );
res.setSettings(qqsettings);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java 2008-11-24 18:28:48 UTC (rev 11992)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/CodeGenerationSettingsTab.java 2008-11-24 18:31:34 UTC (rev 11993)
@@ -27,7 +27,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
import org.eclipse.core.variables.IStringVariableManager;
import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -84,6 +83,7 @@
private SelectionButtonDialogField preferRawCompositeIds;
private SelectionButtonDialogField autoVersioning;
private SelectionButtonDialogField autoManyToMany;
+ private SelectionButtonDialogField autoOneToOne;
private SelectionButtonDialogField useOwnTemplates;
private DirectoryBrowseField templatedir;
@@ -223,13 +223,19 @@
autoManyToMany.setSelection(true);
autoManyToMany.setDialogFieldListener(fieldlistener);
+ autoOneToOne = new SelectionButtonDialogField(SWT.CHECK);
+ autoOneToOne.setLabelText(HibernateConsoleMessages.CodeGenerationSettingsTab_detect_one_to_one_associations);
+ autoOneToOne.setSelection(true);
+ autoOneToOne.setDialogFieldListener(fieldlistener);
+
+
autoVersioning = new SelectionButtonDialogField(SWT.CHECK);
autoVersioning.setLabelText(HibernateConsoleMessages.CodeGenerationSettingsTab_detect_optimistic_lock_columns);
autoVersioning.setSelection(true);
autoVersioning.setDialogFieldListener(fieldlistener);
useOwnTemplates.attachDialogField(templatedir);
- reverseengineer.attachDialogFields(new DialogField[] { packageName, preferRawCompositeIds, reverseEngineeringSettings, reverseEngineeringStrategy, autoManyToMany, autoVersioning });
+ reverseengineer.attachDialogFields(new DialogField[] { packageName, preferRawCompositeIds, reverseEngineeringSettings, reverseEngineeringStrategy, autoManyToMany, autoOneToOne, autoVersioning });
consoleConfigurationName.doFillIntoGrid(container, 4);
Control[] controls = outputdir.doFillIntoGrid(container, 4);
@@ -246,6 +252,8 @@
autoVersioning.doFillIntoGrid(container, 3);
fillLabel(container);
autoManyToMany.doFillIntoGrid(container, 3);
+ fillLabel(container);
+ autoOneToOne.doFillIntoGrid(container, 3);
useOwnTemplates.doFillIntoGrid(container, 4);
controls = templatedir.doFillIntoGrid(container, 4);
// Hack to tell the text field to stretch!
@@ -409,6 +417,7 @@
preferRawCompositeIds.setSelection(attributes.isPreferBasicCompositeIds());
autoManyToMany.setSelection( attributes.detectManyToMany() );
autoVersioning.setSelection( attributes.detectOptimisticLock() );
+ autoOneToOne.setSelection( attributes.detectOneToOne());
outputdir.setText(safeText(attributes.getOutputPath()));
reverseengineer.setSelection(attributes.isReverseEngineer());
reverseEngineeringSettings.setText(safeText(attributes.getRevengSettings()));
@@ -437,6 +446,7 @@
configuration.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, strOrNull(outputdir.getText()));
configuration.setAttribute(HibernateLaunchConstants.ATTR_PREFER_BASIC_COMPOSITE_IDS, preferRawCompositeIds.isSelected());
configuration.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_MANY_TO_MANY, autoManyToMany.isSelected());
+ configuration.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_ONE_TO_ONE, autoOneToOne.isSelected());
configuration.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_VERSIONING, autoVersioning.isSelected());
configuration.setAttribute(HibernateLaunchConstants.ATTR_REVERSE_ENGINEER, isReverseEngineerEnabled());
configuration.setAttribute(HibernateLaunchConstants.ATTR_REVERSE_ENGINEER_STRATEGY, strOrNull(reverseEngineeringStrategy.getText()));
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterAttributes.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterAttributes.java 2008-11-24 18:28:48 UTC (rev 11992)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ExporterAttributes.java 2008-11-24 18:31:34 UTC (rev 11993)
@@ -73,8 +73,9 @@
private String outputPath;
private String templatePath;
private List exporterFactories;
- // if set then build reveng strategy relying on the list of tables
+
private boolean autoManyToManyDetection;
+ private boolean autoOneToOneDetection;
private boolean autoVersioning;
public ExporterAttributes () { }
@@ -101,6 +102,7 @@
templatePath = configuration.getAttribute(HibernateLaunchConstants.ATTR_TEMPLATE_DIR,""); //$NON-NLS-1$
preferBasicCompositeIds = configuration.getAttribute(HibernateLaunchConstants.ATTR_PREFER_BASIC_COMPOSITE_IDS, true);
autoManyToManyDetection = configuration.getAttribute( HibernateLaunchConstants.ATTR_AUTOMATIC_MANY_TO_MANY, true);
+ autoOneToOneDetection = configuration.getAttribute( HibernateLaunchConstants.ATTR_AUTOMATIC_ONE_TO_ONE, true);
autoVersioning = configuration.getAttribute( HibernateLaunchConstants.ATTR_AUTOMATIC_VERSIONING, true);
@@ -353,4 +355,8 @@
return autoVersioning;
}
+ public boolean detectOneToOne() {
+ return autoOneToOneDetection;
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/HibernateLaunchConstants.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/HibernateLaunchConstants.java 2008-11-24 18:28:48 UTC (rev 11992)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/HibernateLaunchConstants.java 2008-11-24 18:31:34 UTC (rev 11993)
@@ -61,6 +61,7 @@
public static final String ATTR_PREFER_BASIC_COMPOSITE_IDS = ATTR_PREFIX + "prefercompositeids"; //$NON-NLS-1$
public static final String ATTR_AUTOMATIC_MANY_TO_MANY = ATTR_PREFIX + "reveng.detect_many_to_many"; //$NON-NLS-1$
public static final String ATTR_AUTOMATIC_VERSIONING = ATTR_PREFIX + "reveng.detect_optimistc_lock"; //$NON-NLS-1$
+ public static final String ATTR_AUTOMATIC_ONE_TO_ONE = ATTR_PREFIX + "reveng.detect_one_to_one"; //$NON-NLS-1$
public static final String ATTR_REVENG_TABLES = ATTR_PREFIX + "reveng.tables";//$NON-NLS-1$
}
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-11-24 18:28:48 UTC (rev 11992)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2008-11-24 18:31:34 UTC (rev 11993)
@@ -87,7 +87,12 @@
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
params.get(IParameter.SEAM_PROJECT_NAME));
+
try {
+
+ ISeamProject seamProject = (ISeamProject)project.getNature(ISeamProject.NATURE_ID);
+ boolean seam2 = seamProject.getRuntime().getVersion().compareTo(SeamVersion.SEAM_2_0) >= 0;
+
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigurationType =
launchManager.getLaunchConfigurationType("org.hibernate.eclipse.launch.CodeGenerationLaunchConfigurationType"); //$NON-NLS-1$
@@ -115,6 +120,10 @@
wc.setAttribute(HibernateLaunchConstants.ATTR_PREFER_BASIC_COMPOSITE_IDS, true);
wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_MANY_TO_MANY, true);
wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_VERSIONING, true);
+
+ boolean seam21 = seamProject.getRuntime().getVersion().compareTo(SeamVersion.SEAM_2_1) >= 0;
+ // Only Seam 2.1 does not break when generating from one-to-one
+ wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_ONE_TO_ONE, seam21);
}
SeamRuntime seamRt = getRuntime(project);
@@ -250,9 +259,6 @@
final String actionpackage = seamFacetPrefs.get(ISeamFacetDataModelProperties.SESSION_BEAN_PACKAGE_NAME, "");
final String actionDir = actionpackage.replace('.','/');
- ISeamProject sprj = (ISeamProject)project.getNature(ISeamProject.NATURE_ID);
- boolean seam2 = sprj.getRuntime().getVersion().equals(SeamVersion.SEAM_2_0);
-
hbmtemplateAttributes = new HashMap<String, String>();
if(seam2) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardUtils.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardUtils.java 2008-11-24 18:28:48 UTC (rev 11992)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardUtils.java 2008-11-24 18:31:34 UTC (rev 11993)
@@ -131,7 +131,9 @@
IResource resource = (IResource) adaptable
.getAdapter(IResource.class);
- return resource.getProject();
+ if(resource!=null) {
+ project = resource.getProject();
+ }
}
}
17 years, 4 months
JBoss Tools SVN: r11991 - 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-11-24 12:51:11 -0500 (Mon, 24 Nov 2008)
New Revision: 11991
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/SeamFacetFilterSetFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3266 Fixed
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-11-24 17:26:31 UTC (rev 11990)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-11-24 17:51:11 UTC (rev 11991)
@@ -391,9 +391,9 @@
seamGenResFolder, webContentFolder, new AntCopyUtils.FileSetFileFilter(webInfSet), viewFilterSetCollection, false);
final FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
- hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
- hibernateDialectFilterSet.addFilterSet(projectFilterSet);
- hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
+ hibernateDialectFilterSet.addFilterSet(encodedJdbcFilterSet);
+ hibernateDialectFilterSet.addFilterSet(encodedProjectFilterSet);
+ hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model, true));
final IContainer source = warSrcRootFolder.getUnderlyingFolder();
@@ -584,9 +584,9 @@
FilterSet projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
- hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
- hibernateDialectFilterSet.addFilterSet(projectFilterSet);
- hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
+ hibernateDialectFilterSet.addFilterSet(encodedJdbcFilterSet);
+ hibernateDialectFilterSet.addFilterSet(encodedProjectFilterSet);
+ hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model, true));
IResource src = getSrcFolder(project);
if(src!=null) {
@@ -644,7 +644,9 @@
protected FilterSet ejbFilterSet;
protected FilterSetCollection viewFilterSetCollection;
protected FilterSet jdbcFilterSet;
+ protected FilterSet encodedJdbcFilterSet;
protected FilterSet projectFilterSet;
+ protected FilterSet encodedProjectFilterSet;
protected FilterSet filtersFilterSet;
/**
@@ -677,7 +679,9 @@
}
jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
- projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
+ encodedJdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model, true);
+ projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
+ encodedProjectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model, true);
filtersFilterSet = SeamFacetFilterSetFactory.createFiltersFilterSet(model);
// ****************************************************************
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetFilterSetFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetFilterSetFactory.java 2008-11-24 17:26:31 UTC (rev 11990)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetFilterSetFactory.java 2008-11-24 17:51:11 UTC (rev 11991)
@@ -60,37 +60,60 @@
FILTERS_TEMPLATE.addFilter("homeName","${component.name}Home"); //$NON-NLS-1$ //$NON-NLS-2$
FILTERS_TEMPLATE.addFilter("query","${query.text}"); //$NON-NLS-1$ //$NON-NLS-2$
-
HIBERNATE_DIALECT_TEMPLATE = new FilterSet();
HIBERNATE_DIALECT_TEMPLATE.addFilter("hibernate.dialect","${hibernate.dialect}"); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
+ public static FilterSet createJdbcFilterSet(IDataModel values, boolean encodeValuesForPropertyFiles) {
+ return applyProperties((FilterSet)JDBC_TEMPLATE.clone(), values, encodeValuesForPropertyFiles);
+ }
+
+ public static FilterSet createProjectFilterSet(IDataModel values, boolean encodeValuesForPropertyFiles){
+ return applyProperties((FilterSet)PROJECT_TEMPLATE.clone(), values, encodeValuesForPropertyFiles);
+ }
+
+ public static FilterSet createFiltersFilterSet(IDataModel values, boolean encodeValuesForPropertyFiles) {
+ return applyProperties((FilterSet)FILTERS_TEMPLATE.clone(), values, encodeValuesForPropertyFiles);
+ }
+
+ public static FilterSet createHibernateDialectFilterSet(IDataModel values, boolean encodeValuesForPropertyFiles) {
+ return applyProperties((FilterSet)HIBERNATE_DIALECT_TEMPLATE.clone(), values, encodeValuesForPropertyFiles);
+ }
+
+ public static FilterSet createFiltersFilterSet(Map values, boolean encodeValuesForPropertyFiles) {
+ return applyProperties((FilterSet)FILTERS_TEMPLATE.clone(), values, false);
+ }
+
public static FilterSet createJdbcFilterSet(IDataModel values) {
- return applyProperties((FilterSet)JDBC_TEMPLATE.clone(), values);
+ return createJdbcFilterSet(values, false);
}
+
public static FilterSet createProjectFilterSet(IDataModel values){
- return applyProperties((FilterSet)PROJECT_TEMPLATE.clone(), values);
+ return createProjectFilterSet(values, false);
}
-
+
public static FilterSet createFiltersFilterSet(IDataModel values) {
- return applyProperties((FilterSet)FILTERS_TEMPLATE.clone(), values);
+ return createFiltersFilterSet(values, false);
}
-
+
public static FilterSet createHibernateDialectFilterSet(IDataModel values) {
- return applyProperties((FilterSet)HIBERNATE_DIALECT_TEMPLATE.clone(), values);
+ return createHibernateDialectFilterSet(values, false);
}
-
+
public static FilterSet createFiltersFilterSet(Map values) {
- return applyProperties((FilterSet)FILTERS_TEMPLATE.clone(), values);
+ return createFiltersFilterSet(values, false);
}
-
- private static FilterSet applyProperties(FilterSet template,IDataModel values) {
+
+ private static FilterSet applyProperties(FilterSet template, IDataModel values, boolean encodeValuesForPropertyFiles) {
FilterSet result = new FilterSet();
for (Object filter : template.getFilterHash().keySet()) {
String value = template.getFilterHash().get(filter).toString();
for (Object property : values.getAllProperties()) {
if(value.contains("${"+property.toString()+"}")) { //$NON-NLS-1$ //$NON-NLS-2$
Object propertyValue = values.getProperty(property.toString());
+ if(encodeValuesForPropertyFiles && propertyValue!=null) {
+ propertyValue = propertyValue.toString().replace("\\", "\\\\");
+ }
value = value.replace("${"+property.toString()+"}",propertyValue==null?"":propertyValue.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
@@ -98,14 +121,17 @@
}
return result;
}
-
- private static FilterSet applyProperties(FilterSet template,Map values) {
+
+ private static FilterSet applyProperties(FilterSet template, Map values, boolean encodeValuesForPropertyFiles) {
FilterSet result = new FilterSet();
for (Object filter : template.getFilterHash().keySet()) {
String value = template.getFilterHash().get(filter).toString();
for (Object property : values.keySet()){
if(value.contains("${"+property.toString()+"}")) { //$NON-NLS-1$ //$NON-NLS-2$
Object propertyValue = values.get(property.toString());
+ if(encodeValuesForPropertyFiles && propertyValue!=null) {
+ propertyValue = propertyValue.toString().replace("\\", "\\\\");
+ }
value = value.replace("${"+property.toString()+"}",propertyValue==null?"":propertyValue.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2008-11-24 17:26:31 UTC (rev 11990)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2008-11-24 17:51:11 UTC (rev 11991)
@@ -90,7 +90,9 @@
protected File hibernateConsolePropsFile;
protected FilterSet jdbcFilterSet;
+ protected FilterSet encodedJdbcFilterSet;
protected FilterSet projectFilterSet;
+ protected FilterSet encodedProjectFilterSet;
protected FilterSetCollection viewFilterSetCollection;
protected FilterSetCollection hibernateDialectFilterSet;
protected File dataSourceDsFile;
@@ -144,16 +146,18 @@
ejbMetaInf = new File(ejbProjectFolder, "ejbModule/META-INF"); //$NON-NLS-1$
jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
+ encodedJdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model, true);
projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
+ encodedProjectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model, true);
viewFilterSetCollection = new FilterSetCollection();
viewFilterSetCollection.addFilterSet(jdbcFilterSet);
viewFilterSetCollection.addFilterSet(projectFilterSet);
hibernateDialectFilterSet = new FilterSetCollection();
- hibernateDialectFilterSet.addFilterSet(jdbcFilterSet);
- hibernateDialectFilterSet.addFilterSet(projectFilterSet);
- hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
+ hibernateDialectFilterSet.addFilterSet(encodedJdbcFilterSet);
+ hibernateDialectFilterSet.addFilterSet(encodedProjectFilterSet);
+ hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model, true));
try {
ejbTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ejb");
17 years, 4 months
JBoss Tools SVN: r11990 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-11-24 12:26:31 -0500 (Mon, 24 Nov 2008)
New Revision: 11990
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3254
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-11-24 17:25:39 UTC (rev 11989)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamSettingsPreferencePage.java 2008-11-24 17:26:31 UTC (rev 11990)
@@ -56,6 +56,7 @@
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamProjectsSet;
+import org.jboss.tools.seam.core.SeamUtil;
import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
@@ -368,7 +369,7 @@
}
private String getDefaultModelPackageName() {
- return "org.domain." + getSeamProjectName() + ".entity";
+ return "org.domain." + SeamUtil.getSeamPackageName(getSeamProjectName()) + ".entity";
}
private String getActionPackageName() {
@@ -383,7 +384,7 @@
}
private String getDefaultActionPackageName() {
- return "org.domain." + getSeamProjectName() + ".session";
+ return "org.domain." + SeamUtil.getSeamPackageName(getSeamProjectName()) + ".session";
}
private String getTestPackageName() {
@@ -398,7 +399,7 @@
}
private String getDefaultTestPackageName() {
- return "org.domain." + getSeamProjectName() + ".test";
+ return "org.domain." + SeamUtil.getSeamPackageName(getSeamProjectName()) + ".test";
}
private String getActionSourceFolder() {
17 years, 4 months
JBoss Tools SVN: r11989 - in trunk/seam/plugins: org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-11-24 12:25:39 -0500 (Mon, 24 Nov 2008)
New Revision: 11989
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.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.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3254
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java 2008-11-24 17:10:07 UTC (rev 11988)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamUtil.java 2008-11-24 17:25:39 UTC (rev 11989)
@@ -84,4 +84,33 @@
return null;
}
}
+
+ /**
+ * Converts seam project name to string which suitable for package names
+ * @param projectNamePackage
+ * @return
+ */
+ public static String getSeamPackageName(String projectName){
+ if(projectName == null)
+ return null;
+
+ String packageName = projectName.toLowerCase();
+
+ if(packageName.indexOf(" ") >= 0)
+ packageName = packageName.replaceAll(" ", "");
+
+ if(packageName.indexOf("-") >= 0)
+ packageName = packageName.replaceAll("-", "");
+
+ if(packageName.indexOf("+") >= 0)
+ packageName = packageName.replaceAll("+", "");
+
+ if(packageName.indexOf("_") >= 0)
+ packageName = packageName.replaceAll("_", "");
+
+ while(packageName.indexOf("..") >= 0){
+ packageName = packageName.replace("..", ".");
+ }
+ return packageName;
+ }
}
\ 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-11-24 17:10:07 UTC (rev 11988)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2008-11-24 17:25:39 UTC (rev 11989)
@@ -85,6 +85,7 @@
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.core.SeamUtil;
import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
@@ -747,8 +748,11 @@
if(model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS)==null) {
model.setProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, warProject?ISeamFacetDataModelProperties.DEPLOY_AS_WAR:ISeamFacetDataModelProperties.DEPLOY_AS_EAR);
}
- Object projectNamePackage = model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME);
- IStatus status = JavaConventions.validatePackageName(projectNamePackage.toString(), CompilerOptions.VERSION_1_5, CompilerOptions.VERSION_1_5);
+ String projectNamePackage = (String)model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME);
+
+ projectNamePackage = SeamUtil.getSeamPackageName(projectNamePackage);
+
+ IStatus status = JavaConventions.validatePackageName(projectNamePackage, CompilerOptions.VERSION_1_5, CompilerOptions.VERSION_1_5);
if(!status.isOK()) {
projectNamePackage = "project"; //$NON-NLS-1$
}
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-11-24 17:10:07 UTC (rev 11988)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2008-11-24 17:25:39 UTC (rev 11989)
@@ -59,6 +59,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.SeamUtil;
import org.jboss.tools.seam.core.project.facet.SeamProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
@@ -455,15 +456,15 @@
String p = (String)model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME);
sessionBeanPkgNameditor
.setValue("org.domain." //$NON-NLS-1$
- + p
+ + SeamUtil.getSeamPackageName(p)
+ ".session"); //$NON-NLS-1$
entityBeanPkgNameditor
.setValue("org.domain." //$NON-NLS-1$
- + p
+ + SeamUtil.getSeamPackageName(p)
+ ".entity"); //$NON-NLS-1$
testsPkgNameditor
.setValue("org.domain." //$NON-NLS-1$
- + p
+ + SeamUtil.getSeamPackageName(p)
+ ".test"); //$NON-NLS-1$
}
17 years, 4 months
JBoss Tools SVN: r11988 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-11-24 12:10:07 -0500 (Mon, 24 Nov 2008)
New Revision: 11988
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
Log:
CODING IN PROGRESS - issue JBIDE-3204: rich:scrollableDataTable's bugs.
https://jira.jboss.org/jira/browse/JBIDE-3204
All references to deprecated class org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil have been removed.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-11-24 16:14:12 UTC (rev 11987)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesScrollableDataTableTemplate.java 2008-11-24 17:10:07 UTC (rev 11988)
@@ -11,10 +11,8 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import java.util.ArrayList;
-import java.util.List;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -76,33 +74,33 @@
Element sourceElement = (Element) sourceNode;
String width = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR);
+ .getAttribute(HTML.ATTR_WIDTH);
String height = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_HEIGHT_ATTR);
+ .getAttribute(HTML.ATTR_HEIGHT);
// -----------CommonTable
nsIDOMElement tableCommon = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ .createElement(HTML.TAG_TABLE);
VpeCreationData creationData = new VpeCreationData(tableCommon);
nsIDOMElement tr1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
nsIDOMElement tr2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
tableCommon.appendChild(tr1);
tableCommon.appendChild(tr2);
// ---------tr2
nsIDOMElement tr2_TD = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
tr2.appendChild(tr2_TD);
nsIDOMElement tr2_td_DIV = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- tr2_td_DIV.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ .createElement(HTML.TAG_DIV);
+ tr2_td_DIV.setAttribute(HTML.ATTR_STYLE,
STYLE_FOR_LOW_SCROLL);
tr2_TD.appendChild(tr2_td_DIV);
@@ -110,36 +108,36 @@
// ---------------------tr1------------------------
nsIDOMElement tr1_TD1 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
tr1.appendChild(tr1_TD1);
nsIDOMElement tr1_TD2 = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ .createElement(HTML.TAG_TD);
tr1.appendChild(tr1_TD2);
nsIDOMElement tr1_td2_DIV = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
- tr1_td2_DIV.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ .createElement(HTML.TAG_DIV);
+ tr1_td2_DIV.setAttribute(HTML.ATTR_STYLE,
STYLE_FOR_RIGHT_SCROLL);
tr1_TD2.appendChild(tr1_td2_DIV);
// -------------------------------------------------------
nsIDOMElement div = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ .createElement(HTML.TAG_DIV);
tr1_TD1.appendChild(div);
- div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, "dr-table-hidden");
+ div.setAttribute(HTML.ATTR_CLASS, "dr-table-hidden");
- String divStyle = HtmlComponentUtil.HTML_WIDTH_ATTR + " : "
+ String divStyle = HTML.ATTR_WIDTH + " : "
+ (width == null ? DEFAULT_WIDTH : width) + ";"
- + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : "
+ + HTML.ATTR_HEIGHT + " : "
+ (height == null ? DEFAULT_HEIGHT : height) + ";";
- div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, divStyle);
+ div.setAttribute(HTML.ATTR_STYLE, divStyle);
nsIDOMElement mainTable = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ .createElement(HTML.TAG_TABLE);
ComponentUtil.copyAttributes(sourceNode, mainTable);
- mainTable.removeAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT);
+ mainTable.removeAttribute(HTML.ATTR_HEIGHT);
nsIDOMElement mainTableWrapper = visualDocument.createElement(TAG_MAIN_TABLE_WRAPPER);
mainTableWrapper.appendChild(mainTable);
@@ -149,9 +147,9 @@
"scrollableDataTable/scrollableDataTable.css",
"richFacesDataTable");
String tableClass = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+ .getAttribute(RichFaces.ATTR_STYLE_CLASS);
mainTable
- .setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ .setAttribute(HTML.ATTR_CLASS,
"dr-table rich-table "
+ (tableClass == null ? "" : tableClass));
@@ -159,8 +157,8 @@
ArrayList<Element> columns = getColumns(sourceElement);
int columnsLength = getColumnsCount(sourceElement, columns);
nsIDOMElement colgroup = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_COLGROUP);
- colgroup.setAttribute(HtmlComponentUtil.HTML_TAG_SPAN, String
+ .createElement(HTML.TAG_COLGROUP);
+ colgroup.setAttribute(HTML.TAG_SPAN, String
.valueOf(columnsLength));
mainTable.appendChild(colgroup);
@@ -172,7 +170,7 @@
ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, HEADER);
if (header != null || !columnsHeaders.isEmpty()) {
nsIDOMElement thead = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_THEAD);
+ .createElement(HTML.TAG_THEAD);
mainTable.appendChild(thead);
String headerClass = (String) sourceElement
.getAttribute(HEADER_CLASS);
@@ -182,22 +180,22 @@
"dr-table-header rich-table-header",
"dr-table-header-continue rich-table-header-continue",
"dr-table-headercell rich-table-headercell",
- headerClass, HtmlComponentUtil.HTML_TAG_TD);
+ headerClass, HTML.TAG_TD);
}
if (!columnsHeaders.isEmpty()) {
- nsIDOMElement tr = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
thead.appendChild(tr);
String styleClass = encodeStyleClass(null,
"dr-table-subheader rich-table-subheader", null,
headerClass);
if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ tr.setAttribute(HTML.ATTR_CLASS,
styleClass);
}
encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
columnsHeaders,
"dr-table-subheadercell rich-table-subheadercell",
- headerClass, HEADER, HtmlComponentUtil.HTML_TAG_TD);
+ headerClass, HEADER, HTML.TAG_TD);
}
}
@@ -206,25 +204,25 @@
ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, FOOTER);
if (footer != null || !columnsFooters.isEmpty()) {
nsIDOMElement tfoot = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TFOOT);
+ .createElement(HTML.TAG_TFOOT);
mainTable.appendChild(tfoot);
String footerClass = (String) sourceElement
.getAttribute(FOOTER_CLASS);
if (!columnsFooters.isEmpty()) {
nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
tfoot.appendChild(tr);
String styleClass = encodeStyleClass(null,
"dr-table-subfooter rich-table-subfooter", null,
footerClass);
if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ tr.setAttribute(HTML.ATTR_CLASS,
styleClass);
}
encodeHeaderOrFooterFacets(creationData, tr, visualDocument,
columnsFooters,
"dr-table-subfootercell rich-table-subfootercell",
- footerClass, FOOTER, HtmlComponentUtil.HTML_TAG_TD);
+ footerClass, FOOTER, HTML.TAG_TD);
}
if (footer != null) {
encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot,
@@ -232,12 +230,12 @@
"dr-table-footer rich-table-footer",
"dr-table-footer-continue rich-table-footer-continue",
"dr-table-footercell rich-table-footercell",
- footerClass, HtmlComponentUtil.HTML_TAG_TD);
+ footerClass, HTML.TAG_TD);
}
}
nsIDOMElement tbody = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TBODY);
+ .createElement(HTML.TAG_TBODY);
mainTable.appendChild(tbody);
for (int i = 0; i < NUM_ROW; i++) {
@@ -260,13 +258,13 @@
nsIDOMElement table) {
// Encode caption
Element captionFromFacet = ComponentUtil.getFacet(sourceElement,
- HtmlComponentUtil.HTML_TAG_CAPTION);
+ HTML.TAG_CAPTION);
if (captionFromFacet != null) {
String captionClass = (String) table.getAttribute(CAPTION_CLASS);
String captionStyle = (String) table.getAttribute(CAPTION_STYLE);
nsIDOMElement caption = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_CAPTION);
+ .createElement(HTML.TAG_CAPTION);
table.appendChild(caption);
if (captionClass != null && captionClass.length() > 0) {
captionClass = "dr-table-caption rich-table-caption "
@@ -274,10 +272,10 @@
} else {
captionClass = "dr-table-caption rich-table-caption";
}
- caption.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
+ caption.setAttribute(HTML.ATTR_CLASS,
captionClass);
if (captionStyle != null && captionStyle.length() > 0) {
- caption.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ caption.setAttribute(HTML.ATTR_STYLE,
captionStyle);
}
@@ -316,12 +314,12 @@
HTML.STYLE_PARAMETER_DISPLAY, HTML.STYLE_VALUE_NONE);
}
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
td.setAttribute("scop", "col");
String colspan = column
- .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
+ .getAttribute(HTML.ATTR_COLSPAN);
if (colspan != null && colspan.length() > 0) {
- td.setAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN, colspan);
+ td.setAttribute(HTML.ATTR_COLSPAN, colspan);
}
Element facetBody = ComponentUtil.getFacet(column, facetName);
@@ -360,16 +358,16 @@
facetBody, visualDocument, parentTheadOrTfood);
} else {
nsIDOMElement tr = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ .createElement(HTML.TAG_TR);
parentTheadOrTfood.appendChild(tr);
String styleClass = encodeStyleClass(null, skinFirstRowClass,
facetBodyClass, null);
if (styleClass != null) {
- tr.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
String style = ComponentUtil.getHeaderBackgoundImgStyle();
- tr.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ tr.setAttribute(HTML.ATTR_STYLE, style);
nsIDOMElement td = visualDocument.createElement(element);
tr.appendChild(td);
@@ -377,14 +375,14 @@
styleClass = encodeStyleClass(null, skinCellClass, facetBodyClass,
null);
if (styleClass != null) {
- td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
}
// the cell spans the entire row
td.setAttribute(HTML.ATTR_COLSPAN, HTML.VALUE_COLSPAN_ALL);
- td.setAttribute(HtmlComponentUtil.HTML_SCOPE_ATTR,
- HtmlComponentUtil.HTML_TAG_COLGROUP);
+ td.setAttribute(HTML.ATTR_SCOPE,
+ HTML.TAG_COLGROUP);
VpeChildrenInfo child = new VpeChildrenInfo(td);
child.addSourceChild(facetBody);
@@ -513,7 +511,7 @@
currentLength = 0;
}
String colspanStr = column
- .getAttribute(HtmlComponentUtil.HTML_TABLE_COLSPAN);
+ .getAttribute(HTML.ATTR_COLSPAN);
try {
int colspan = Integer.parseInt(colspanStr);
currentLength += colspan > 0 ? colspan : 1;
@@ -606,25 +604,25 @@
// nsIDOMNode visualNode, Object data, String name) {
// nsIDOMElement visualElement = (nsIDOMElement) visualNode
// .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- // if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_WIDTH_ATTR)) {
+ // if (name.equalsIgnoreCase(HTML.ATTR_WIDTH)) {
// String style = visualElement
// .getAttribute(HtmlComponentUtil.HTML_S // Append colspan of this column
- // visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- // style += "; " + HtmlComponentUtil.HTML_WIDTH_ATTR + " : "
+ // visualElement.removeAttribute(HTML.ATTR_STYLE);
+ // style += "; " + HTML.ATTR_WIDTH + " : "
// + DEFAULT_WIDTH + ";";
// visualElement
- // .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ // .setAttribute(HTML.ATTR_STYLE, style);
//
// } else
//
- // if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_HEIGHT_ATTR)) {
+ // if (name.equalsIgnoreCase(HTML.ATTR_HEIGHT)) {
// String style = visualElement
- // .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- // visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- // style += "; " + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : "
+ // .getAttribute(HTML.ATTR_STYLE);
+ // visualElement.removeAttribute(HTML.ATTR_STYLE);
+ // style += "; " + HTML.ATTR_HEIGHT + " : "
// + DEFAULT_HEIGHT + ";";
// visualElement
- // .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ // .setAttribute(HTML.ATTR_STYLE, style);
//
// } else {
// visualElement.removeAttribute(name);
@@ -638,25 +636,25 @@
// String name, String value) {
// nsIDOMElement visualElement = (nsIDOMElement) visualNode
// .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- // if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_WIDTH_ATTR)) {
+ // if (name.equalsIgnoreCase(HTML.ATTR_WIDTH)) {
// String style = visualElement
- // .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- // visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- // style += "; " + HtmlComponentUtil.HTML_WIDTH_ATTR + " : " + value
+ // .getAttribute(HTML.ATTR_STYLE);
+ // visualElement.removeAttribute(HTML.ATTR_STYLE);
+ // style += "; " + HTML.ATTR_WIDTH + " : " + value
// + ";";
// visualElement
- // .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ // .setAttribute(HTML.ATTR_STYLE, style);
//
// }
//
- // if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_HEIGHT_ATTR)) {
+ // if (name.equalsIgnoreCase(HTML.ATTR_HEIGHT)) {
// String style = visualElement
- // .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- // visualElement.removeAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- // style += "; " + HtmlComponentUtil.HTML_HEIGHT_ATTR + " : " + value
+ // .getAttribute(HTML.ATTR_STYLE);
+ // visualElement.removeAttribute(HTML.ATTR_STYLE);
+ // style += "; " + HTML.ATTR_HEIGHT + " : " + value
// + ";";
// visualElement
- // .setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ // .setAttribute(HTML.ATTR_STYLE, style);
//
// }
// visualElement.setAttribute(name, value);
17 years, 4 months
JBoss Tools SVN: r11987 - in trunk/common/plugins/org.jboss.tools.common.projecttemplates: lib/RichFaces3.2 and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-11-24 11:14:12 -0500 (Mon, 24 Nov 2008)
New Revision: 11987
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.1/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-api-3.2.2.SR1.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-impl-3.2.2.SR1.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-ui-3.2.2.SR1.jar
Removed:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces/
Modified:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFCapabilities.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-2197 Fixed
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.1 (from rev 8448, trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces)
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-api-3.2.2.SR1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-api-3.2.2.SR1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-impl-3.2.2.SR1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-impl-3.2.2.SR1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-ui-3.2.2.SR1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/lib/RichFaces3.2/richfaces-ui-3.2.2.SR1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFCapabilities.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFCapabilities.xml 2008-11-24 16:13:46 UTC (rev 11986)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFCapabilities.xml 2008-11-24 16:14:12 UTC (rev 11987)
@@ -42,6 +42,7 @@
</capability>
<capability name="Facelets">
<library name="facelets" />
+ <conflicting-library name="jsf-facelets.jar"/>
<file-addition file-name="/WEB-INF/web.xml"
label="Refresh Period Parameter" x-path="/web-app">
<![CDATA[<context-param>
@@ -61,9 +62,38 @@
<![CDATA[<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>]]>
</file-addition>
</capability>
+ <capability name="JBoss RichFaces 3.2">
+ <library name="RichFaces3.2" />
+ <conflicting-library name="richfaces-api-3.2.*"/>
+ <file-addition file-name="/WEB-INF/web.xml"
+ label="Skin Parameter" x-path="/web-app">
+ <![CDATA[<context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>classic</param-value>
+</context-param>]]>
+ </file-addition>
+ <file-addition file-name="/WEB-INF/web.xml"
+ label="Ajax4jsf Filter" x-path="/web-app">
+ <![CDATA[<filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+</filter>]]>
+ </file-addition>
+ <file-addition file-name="/WEB-INF/web.xml"
+ label="Ajax4jsf Filter mapping" x-path="/web-app">
+ <![CDATA[<filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+</filter-mapping> ]]>
+ </file-addition>
+ </capability>
<capability name="JBoss RichFaces 3.1">
- <library name="RichFaces" />
- <conflicting-library name="a4j.jar"/>
+ <library name="RichFaces3.1" />
+ <conflicting-library name="richfaces-api-3.1.*"/>
<file-addition file-name="/WEB-INF/web.xml"
label="Skin Parameter" x-path="/web-app">
<![CDATA[<context-param>
17 years, 4 months
JBoss Tools SVN: r11986 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-11-24 11:13:46 -0500 (Mon, 24 Nov 2008)
New Revision: 11986
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml
Log:
Test of template for <h:dataTable> has been fixed.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml 2008-11-24 15:52:14 UTC (rev 11985)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml 2008-11-24 16:13:46 UTC (rev 11986)
@@ -1,41 +1,27 @@
<tests>
<test id="dataTable">
- <TABLE>
+ <TABLE STYLE="-moz-user-modify: read-only;">
<TR>
<TD>
<DIV>
<TABLE>
<CAPTION>
- <BR />
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
</CAPTION>
- <THEAD>
- <TR>
- <TH>
- <BR />
- </TH>
- </TR>
- </THEAD>
- <TFOOT>
- <TR>
- <TD>
- <BR />
- </TD>
- </TR>
- </TFOOT>
<TBODY>
<TR>
- <TD>
+ <TD STYLE="border: 0px hidden ; padding: 0px;">
<TABLE WIDTH="100%" BORDER="0">
<THEAD>
<TR>
<TH>
<DIV>
- <SPAN> Last Name </SPAN>
+ <SPAN>Last Name</SPAN>
</DIV>
</TH>
<TH>
<DIV>
- <SPAN> First Name </SPAN>
+ <SPAN>First Name</SPAN>
</DIV>
</TH>
</TR>
@@ -44,12 +30,12 @@
<TR>
<TD>
<DIV>
- <SPAN> footer </SPAN>
+ <SPAN>footer</SPAN>
</DIV>
</TD>
<TD>
<DIV>
- <SPAN> footer </SPAN>
+ <SPAN>footer</SPAN>
</DIV>
</TD>
</TR>
@@ -57,16 +43,16 @@
<TBODY>
<TR>
<TD>
- <SPAN> Dupont </SPAN>
+ <SPAN>Dupont</SPAN>
</TD>
<TD>
- <SPAN> William </SPAN>
+ <SPAN>William</SPAN>
</TD>
</TR>
</TBODY>
<COLGROUP>
- <COL />
- <COL />
+ <COL STYLE="-moz-user-modify: read-write;"/>
+ <COL STYLE="-moz-user-modify: read-write;"/>
</COLGROUP>
</TABLE>
</TD>
17 years, 4 months
JBoss Tools SVN: r11985 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-11-24 10:52:14 -0500 (Mon, 24 Nov 2008)
New Revision: 11985
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/LibrariesPerformer.java
Log:
JBIDE-2197
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/LibrariesPerformer.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/LibrariesPerformer.java 2008-11-24 15:46:54 UTC (rev 11984)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/LibrariesPerformer.java 2008-11-24 15:52:14 UTC (rev 11985)
@@ -22,6 +22,7 @@
import org.jboss.tools.common.meta.action.impl.handlers.DefaultCreateHandler;
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
import org.jboss.tools.common.util.FileUtil;
@@ -90,12 +91,37 @@
ArrayList<IFile> cfjs = new ArrayList<IFile>();
for (int i = 0; i < conflictingLibraryReferences.length; i++) {
String name = conflictingLibraryReferences[i].getAttributeValue("name");
- IFile f = r.getFile(new Path(name));
- if(f.exists()) cfjs.add(f);
+ collectFiles(r, name, cfjs);
}
conflictingFiles = cfjs.toArray(new IFile[0]);
}
}
+
+ private void collectFiles(IContainer r, String name, ArrayList<IFile> cfjs) {
+ int wildcard = name.indexOf('*');
+ if(wildcard < 0) {
+ IFile f = r.getFile(new Path(name));
+ if(f.exists()) cfjs.add(f);
+ } else {
+ IResource[] rs = null;
+ try {
+ rs = r.members();
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError(e);
+ }
+ if(rs != null) {
+ String prefix = name.substring(0, wildcard);
+ String suffix = name.substring(wildcard);
+ for (int i = 0; i < rs.length; i++) {
+ if(!(rs[i] instanceof IFile)) continue;
+ String n = rs[i].getName();
+ if(prefix.length() > 0 && !n.startsWith(prefix)) continue;
+ if(suffix.length() > 0 && !n.endsWith(suffix)) continue;
+ cfjs.add((IFile)rs[i]);
+ }
+ }
+ }
+ }
public boolean check(PerformerContext context) {
if(!isSelected()) return true;
17 years, 4 months
JBoss Tools SVN: r11984 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-11-24 10:46:54 -0500 (Mon, 24 Nov 2008)
New Revision: 11984
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/AddJSFCapabilitiesSupport.java
Log:
JBIDE-3251
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/AddJSFCapabilitiesSupport.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/AddJSFCapabilitiesSupport.java 2008-11-24 15:45:25 UTC (rev 11983)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/capabilities/AddJSFCapabilitiesSupport.java 2008-11-24 15:46:54 UTC (rev 11984)
@@ -85,7 +85,7 @@
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
monitor.beginTask("" + getTitle(), getTaskCount());
try {
- XJob.waitForJob();
+ XJob.waitForJob(true);
} catch (InterruptedException e) {
//ignore
}
17 years, 4 months