Author: dgolovin
Date: 2009-02-09 20:01:49 -0500 (Mon, 09 Feb 2009)
New Revision: 13553
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/TestWizards/.project
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java
trunk/tests/features/org.jboss.tools.test.feature/feature.xml
Log:
enable seam.pages.xml tests
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/TestWizards/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/TestWizards/.project 2009-02-10
00:29:00 UTC (rev 13552)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/projects/TestWizards/.project 2009-02-10
01:01:49 UTC (rev 13553)
@@ -6,11 +6,6 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
@@ -20,16 +15,6 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.jboss.tools.common.verification.verifybuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java 2009-02-10
00:29:00 UTC (rev 13552)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java 2009-02-10
01:01:49 UTC (rev 13553)
@@ -38,8 +38,8 @@
public static String RUNTIME_CONFIG_FORMAT_VERSION = "1.0"; //$NON-NLS-1$
- public static final String SEAM_1_2_HOME = "../../../../jboss-eap/seam";
//$NON-NLS-1$
- public static final String SEAM_2_0_HOME = "../../../../jboss-eap/seamfp";
//$NON-NLS-1$
+ public static final String SEAM_1_2_HOME = "../../../seam1"; //$NON-NLS-1$
+ public static final String SEAM_2_0_HOME = "../../../seam"; //$NON-NLS-1$
/**
*
@@ -58,6 +58,31 @@
node.put(SeamProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS, "war");
//$NON-NLS-1$
node.put(SeamProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE, "HSQL");
//$NON-NLS-1$
node.put(SeamProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE,
"DefaultDS"); //$NON-NLS-1$
+ Map<String, SeamRuntime> map = new HashMap<String,SeamRuntime>();
+
+ // Initialize Seam 1.2 Runtime from JBoss EAP
+ String seamGenBuildPath = getSeamGenBuildPath(SEAM_1_2_HOME);
+ File seamFolder = new File(seamGenBuildPath);
+ if(seamFolder.exists() && seamFolder.isDirectory()) {
+ SeamRuntime rt = new SeamRuntime();
+ rt.setHomeDir(seamGenBuildPath);
+ rt.setName("Seam " + SeamVersion.SEAM_1_2 + ".AP"); //$NON-NLS-1$
//$NON-NLS-2$
+ rt.setDefault(true);
+ rt.setVersion(SeamVersion.SEAM_1_2);
+ map.put(rt.getName(), rt);
+ }
+ // Initialize Seam 2.0 Runtime from JBoss EAP
+ seamGenBuildPath = getSeamGenBuildPath(SEAM_2_0_HOME);
+ seamFolder = new File(seamGenBuildPath);
+ if(seamFolder.exists() && seamFolder.isDirectory()) {
+ SeamRuntime rt = new SeamRuntime();
+ rt.setHomeDir(seamGenBuildPath);
+ rt.setName("Seam " + SeamVersion.SEAM_2_1); //$NON-NLS-1$ //$NON-NLS-2$
+ rt.setDefault(true);
+ rt.setVersion(SeamVersion.SEAM_2_1);
+ map.put(rt.getName(), rt);
+ }
+ node.put(SeamProjectPreferences.RUNTIME_LIST, new
SeamRuntimeListConverter().getString(map));
try {
node.flush();
} catch (BackingStoreException e) {
@@ -65,4 +90,22 @@
}
}
+
+
+ private String getSeamGenBuildPath(String seamHomePath) {
+ String pluginLocation=null;
+ try {
+ pluginLocation =
FileLocator.resolve(SeamCorePlugin.getDefault().getBundle().getEntry("/")).getFile();
//$NON-NLS-1$
+ } catch (IOException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ };
+ File seamGenDir = new File(pluginLocation, seamHomePath);
+ Path p = new Path(seamGenDir.getPath());
+ p.makeAbsolute();
+ if(p.toFile().exists()) {
+ return p.toOSString();
+ } else {
+ return ""; //$NON-NLS-1$
+ }
+ }
}
Modified: trunk/tests/features/org.jboss.tools.test.feature/feature.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2009-02-10 00:29:00 UTC
(rev 13552)
+++ trunk/tests/features/org.jboss.tools.test.feature/feature.xml 2009-02-10 01:01:49 UTC
(rev 13553)
@@ -425,4 +425,10 @@
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.jboss.tools.seam.pages.xml.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
Show replies by date