Author: dazarov
Date: 2010-04-16 06:10:00 -0400 (Fri, 16 Apr 2010)
New Revision: 21521
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.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6191
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 2010-04-16
09:59:30 UTC (rev 21520)
+++
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2010-04-16
10:10:00 UTC (rev 21521)
@@ -198,6 +198,13 @@
fproj.installProjectFacet(dynamicWebVersion, null, null);
fproj.installProjectFacet(javaFacesVersion, null, null);
}
+
+ protected void setIfEmpty(IDataModel model, String propertyName, String value){
+ String oldValue = model.getStringProperty(propertyName);
+ if(oldValue == null || "".equals(oldValue)){
+ model.setStringProperty(propertyName, value);
+ }
+ }
protected IFacetedProject createSeamProject(String baseProjectName, final IDataModel
config) throws CoreException {
final IFacetedProject fproj = ProjectFacetsManager.create(baseProjectName, null,
@@ -213,6 +220,9 @@
final IProject proj = fproj.getProject();
+ setIfEmpty(config, ISeamFacetDataModelProperties.SEAM_TEST_PROJECT,
baseProjectName+"-test");
+ setIfEmpty(config, ISeamFacetDataModelProperties.SEAM_EAR_PROJECT,
baseProjectName+"-ear");
+ setIfEmpty(config, ISeamFacetDataModelProperties.SEAM_EJB_PROJECT,
baseProjectName+"-ejb");
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java
===================================================================
---
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java 2010-04-16
09:59:30 UTC (rev 21520)
+++
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamCreateTestProjectTest.java 2010-04-16
10:10:00 UTC (rev 21521)
@@ -34,12 +34,8 @@
// set property to create test project
model.setProperty(ISeamFacetDataModelProperties.TEST_PROJECT_CREATING, new
Boolean(createTestProject));
- model.setStringProperty(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT,
name+"-test");
- model.setStringProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT,
name+"-ear");
- model.setStringProperty(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT,
name+"-ejb");
model.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, seamVersion);
-
final IFacetedProject fproj = createSeamProject(name, model);