Author: dgolovin
Date: 2008-12-17 19:07:22 -0500 (Wed, 17 Dec 2008)
New Revision: 12665
Modified:
branches/jbosstools-3.0.0.CR1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3161 seam runtimes initialization removed from
seam.core plugin
Modified:
branches/jbosstools-3.0.0.CR1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java
===================================================================
---
branches/jbosstools-3.0.0.CR1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java 2008-12-18
00:05:41 UTC (rev 12664)
+++
branches/jbosstools-3.0.0.CR1/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java 2008-12-18
00:07:22 UTC (rev 12665)
@@ -58,52 +58,10 @@
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_0 + ".FP"); //$NON-NLS-1$
//$NON-NLS-2$
- rt.setDefault(true);
- rt.setVersion(SeamVersion.SEAM_2_0);
- map.put(rt.getName(), rt);
- }
- node.put(SeamProjectPreferences.RUNTIME_LIST, new
SeamRuntimeListConverter().getString(map));
try {
node.flush();
} catch (BackingStoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
}
-
- 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$
- }
- }
}