geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r631023 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.runtime.v21/META-INF/ org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ org.apache.geronimo.st.v21.core/
Date Mon, 25 Feb 2008 22:36:15 GMT
Author: mcconne
Date: Mon Feb 25 14:36:13 2008
New Revision: 631023

URL: http://svn.apache.org/viewvc?rev=631023&view=rev
Log:
GERONIMODEVTOOLS-280 Fix Server Runtime view

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.properties

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF?rev=631023&r1=631022&r2=631023&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v21/META-INF/MANIFEST.MF
Mon Feb 25 14:36:13 2008
@@ -101,8 +101,8 @@
  org.apache.geronimo.util.asn1.pkcs,
  org.apache.geronimo.util.asn1.sec,
  org.apache.geronimo.util.asn1.util,
- org.apache.geronimo.util.asn1.x509,
  org.apache.geronimo.util.asn1.x9,
+ org.apache.geronimo.util.asn1.x509,
  org.apache.geronimo.util.crypto,
  org.apache.geronimo.util.crypto.digests,
  org.apache.geronimo.util.crypto.modes,
@@ -129,6 +129,12 @@
  org.apache.geronimo.xbeans.geronimo.security.subjectinfo.impl,
  org.apache.geronimo.xbeans.geronimo.web,
  org.apache.geronimo.xbeans.geronimo.web.impl,
+ org.apache.geronimo.xbeans.javaee,
+ org.apache.geronimo.xbeans.javaee.impl,
+ org.apache.geronimo.xbeans.persistence,
+ org.apache.geronimo.xbeans.persistence.impl,
+ org.apache.geronimo.xml.ns.security12,
+ org.apache.geronimo.xml.ns.security12.impl,
  org.codehaus.plexus.archiver,
  org.codehaus.plexus.archiver.bzip2,
  org.codehaus.plexus.archiver.dir,
@@ -170,6 +176,9 @@
  schemaorg_apache_xmlbeans.javaname.org.apache.geronimo.xbeans.geronimo.web,
  schemaorg_apache_xmlbeans.javaname.org.apache.geronimo.xbeans.javaee, 
  schemaorg_apache_xmlbeans.javaname.org.apache.geronimo.xbeans.persistence, 
+ schemaorg_apache_xmlbeans.javaname.org.apache.geronimo.xbeans.persistence.PersistenceDocument,
+ schemaorg_apache_xmlbeans.javaname.org.apache.geronimo.xbeans.persistence.PersistenceDocument.Persistence,
+ schemaorg_apache_xmlbeans.javaname.org.apache.geronimo.xbeans.persistence.PersistenceDocument.Persistence.PersistenceUnit,
  schemaorg_apache_xmlbeans.javaname.org.apache.geronimo.xbeans.persistence.PersistenceDocument.Persistence.PersistenceUnit.Properties,
  schemaorg_apache_xmlbeans.javaname.org.apache.geronimo.xml.ns.security12,
  schemaorg_apache_xmlbeans.modelgroup.http_3A_2F_2Fgeronimo_2Eapache_2Eorg_2Fxml_2Fns_2Fnaming_2D1_2E2,
@@ -189,14 +198,14 @@
  schemaorg_apache_xmlbeans.namespace.URI_SHA_1_F04B01A0100CE4D6D8E05EA89F04B1A3232530D3,
  schemaorg_apache_xmlbeans.namespace.URI_SHA_1_F192CE7C4783FF6FCD001EBCFD7068507094E005,
  schemaorg_apache_xmlbeans.src,
- schemaorg_apache_xmlbeans.system.sDF9A228CF97621FEF7F6C23DADCB01C3,
- schemaorg_apache_xmlbeans.system.sD8D2E0C4E01E2FBE03F334B17DEB7DCF,
- schemaorg_apache_xmlbeans.system.s07396805C0C071F46DCDFA4074210AF5,
+ schemaorg_apache_xmlbeans.system.sAD0A02D5B50A03344A8F7BF41013BBFA,
+ schemaorg_apache_xmlbeans.system.sAB6328A82D9B03971181A657735538BA,
+ schemaorg_apache_xmlbeans.system.sA1B3CA54CF93388C8DDA7A8A0FDDABB6,
+ schemaorg_apache_xmlbeans.system.s201396FB585000C771A01656A7C189E4,
  schemaorg_apache_xmlbeans.system.s89707DCAF3CBDF7238EB45FA6C3735CD,
- schemaorg_apache_xmlbeans.system.s85BDA30F99DFA5175044CB2EE3B37D4A,
- schemaorg_apache_xmlbeans.system.s14F95BA84765AD427FCCE00E72BA0596,
+ schemaorg_apache_xmlbeans.system.s794A99A3152C720B77CF1939795046F7,
+ schemaorg_apache_xmlbeans.system.s8B5C097D1DA856114A6FCF66D1BD9471,
  schemaorg_apache_xmlbeans.system.s8AF8E0CE57F2BB021E91A9ABBD290FAF,
- schemaorg_apache_xmlbeans.system.s7A627733B4E9C7DD34AC48B4FBEEBBCB,
  schemaorg_apache_xmlbeans.type.http_3A_2F_2Fgeronimo_2Eapache_2Eorg_2Fxml_2Fns_2Fnaming_2D1_2E2,
  schemaorg_apache_xmlbeans.type.http_3A_2F_2Fjava_2Esun_2Ecom_2Fxml_2Fns_2Fjavaee,
  schemaorg_apache_xmlbeans.type.http_3A_2F_2Fjava_2Esun_2Ecom_2Fxml_2Fns_2Fpersistence,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java?rev=631023&r1=631022&r2=631023&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
Mon Feb 25 14:36:13 2008
@@ -43,278 +43,306 @@
  */
 abstract public class GeronimoRuntimeDelegate extends RuntimeDelegate implements IGeronimoRuntime
{
 
-	private static final String PROP_VM_INSTALL_TYPE_ID = "vm-install-type-id";
+    private static final String PROP_VM_INSTALL_TYPE_ID = "vm-install-type-id";
 
-	private static final String PROP_VM_INSTALL_ID = "vm-install-id";
+    private static final String PROP_VM_INSTALL_ID = "vm-install-id";
 
-	public static final String SERVER_INSTANCE_PROPERTIES = "geronimo_server_instance_properties";
-	
-	public static final String RUNTIME_SOURCE= "runtime.source";
-
-	public static final int NO_IMAGE = 0;
-
-	public static final int INCORRECT_VERSION = 1;
-
-	public static final int PARTIAL_IMAGE = 2;
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.jst.server.core.IJavaRuntime#getVMInstall()
-	 */
-	public IVMInstall getVMInstall() {
-		if (getVMInstallTypeId() == null)
-			return JavaRuntime.getDefaultVMInstall();
-		try {
-			IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(getVMInstallTypeId());
-			IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
-			int size = vmInstalls.length;
-			String id = getVMInstallId();
-			for (int i = 0; i < size; i++) {
-				if (id.equals(vmInstalls[i].getId()))
-					return vmInstalls[i];
-			}
-		} catch (Exception e) {
-			// ignore
-		}
-		return null;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.server.core.model.RuntimeDelegate#validate()
-	 */
-	public IStatus validate() {
-		IStatus status = super.validate();
-
-		if (!status.isOK()) {
-			return status;
-		}
-
-		if (getVMInstall() == null)
-			return new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.errorJRE, null);
-
-		IPath runtimeLoc = getRuntime().getLocation();
-
-		// check for server file structure
-		int count = 0;
-		count = runtimeLoc.append("bin/server.jar").toFile().exists() ? ++count : count;
-		count = runtimeLoc.append("bin/deployer.jar").toFile().exists() ? ++count : count;
-		count = runtimeLoc.append("lib").toFile().exists() ? ++count : count;
-		count = runtimeLoc.append("repository").toFile().exists() ? ++count : count;
-
-		if (count == 0)
-			return new Status(IStatus.ERROR, Activator.PLUGIN_ID, NO_IMAGE, "", null);
-
-		if (count < 4) {
-			// part of a server image was found, don't let install happen
-			return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PARTIAL_IMAGE, Messages.missingContent,
null);
-		}
-
-		String detectedVersion = detectVersion();
-		if (detectedVersion == null)
-			return new Status(IStatus.WARNING, Activator.PLUGIN_ID, INCORRECT_VERSION, Messages.noVersion,
null);
-
-		if (!detectedVersion.startsWith(getRuntime().getRuntimeType().getVersion())) {
-			String message = NLS.bind(Messages.incorrectVersion, new String[] {
-					getRuntime().getRuntimeType().getVersion(), detectedVersion });
-			return new Status(IStatus.ERROR, Activator.PLUGIN_ID, INCORRECT_VERSION, message, null);
-		}
-
-		return Status.OK_STATUS;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see org.eclipse.wst.server.core.model.RuntimeDelegate#setDefaults(org.eclipse.core.runtime.IProgressMonitor)
-	 */
-	public void setDefaults(IProgressMonitor monitor) {
-		IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
-		setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
-	}
-	
-	/* (non-Javadoc)
-	 * @see org.apache.geronimo.st.core.IGeronimoRuntime#getRuntimeSourceLocation()
-	 */
-	public IPath getRuntimeSourceLocation() {
-		String source = (String) getServerInstanceProperties().get(RUNTIME_SOURCE);
-		if(source != null) {
-			return new Path(source);
-		}
-		return null;
-	}
-	
-	public void setRuntimeSourceLocation(String path) {
-		setInstanceProperty(RUNTIME_SOURCE, path);
-	}
-
-	/**
-	 * @return
-	 */
-	public String detectVersion() {
-
-		URL systemjarURL = null;
-		//
-		// Check lib directory first
-		//
-		File libDir = getRuntime().getLocation().append("lib").toFile();
-		if (libDir.exists()) {
-			File[] libs = libDir.listFiles();
-			for (int i = 0; i < libs.length; i++) {
-				if (libs[i].getName().startsWith("geronimo-system")) {
-					try {
-						systemjarURL = libs[i].toURL();
-						break;
-					} catch (MalformedURLException e) {
-						e.printStackTrace();
-					}
-				}
-			}
-		}
-		// 
-		// Check repository if necessary
-		//
-                if (systemjarURL == null) {
-                    File systemDir = getRuntime().getLocation().append("repository/org/apache/geronimo/modules/geronimo-system").toFile();
-                    if (systemDir.exists() && systemDir.isDirectory() &&
systemDir.canRead()) {
-                        List<File> dirFiles = scanDirectory(systemDir);
-                        for (File jarFile : dirFiles) {
-                            if (jarFile.getName().startsWith("geronimo-system") &&
jarFile.getName().endsWith("jar")) {
-                                try {
-                                    systemjarURL = jarFile.toURL();
-                                    break;
-                                }
-                                catch (MalformedURLException e) {
-                                    e.printStackTrace();
-                                }
-                            }
-                        }
+    public static final String SERVER_INSTANCE_PROPERTIES = "geronimo_server_instance_properties";
+
+    public static final String RUNTIME_SOURCE= "runtime.source";
+
+    public static final int NO_IMAGE = 0;
+
+    public static final int INCORRECT_VERSION = 1;
+
+    public static final int PARTIAL_IMAGE = 2;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jst.server.core.IJavaRuntime#getVMInstall()
+     */
+    public IVMInstall getVMInstall() {
+        if (getVMInstallTypeId() == null)
+            return JavaRuntime.getDefaultVMInstall();
+        try {
+            IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(getVMInstallTypeId());
+            IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
+            int size = vmInstalls.length;
+            String id = getVMInstallId();
+            for (int i = 0; i < size; i++) {
+                if (id.equals(vmInstalls[i].getId()))
+                    return vmInstalls[i];
+            }
+        }
+        catch (Exception e) {
+            // ignore
+        }
+        return null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.wst.server.core.model.RuntimeDelegate#validate()
+     */
+    public IStatus validate() {
+        IStatus status = super.validate();
+
+        if (!status.isOK()) {
+            return status;
+        }
+
+        if (getVMInstall() == null)
+            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, Messages.errorJRE, null);
+
+        IPath runtimeLoc = getRuntime().getLocation();
+
+        // check for server file structure
+        int count = 0;
+        count = runtimeLoc.append("bin/server.jar").toFile().exists() ? ++count : count;
+        count = runtimeLoc.append("bin/deployer.jar").toFile().exists() ? ++count : count;
+        count = runtimeLoc.append("lib").toFile().exists() ? ++count : count;
+        count = runtimeLoc.append("repository").toFile().exists() ? ++count : count;
+
+        if (count == 0)
+            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, NO_IMAGE, "", null);
+
+        if (count < 4) {
+            // part of a server image was found, don't let install happen
+            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, PARTIAL_IMAGE, Messages.missingContent,
null);
+        }
+
+        String detectedVersion = detectVersion();
+        if (detectedVersion == null)
+            return new Status(IStatus.WARNING, Activator.PLUGIN_ID, INCORRECT_VERSION, Messages.noVersion,
null);
+
+        if (!detectedVersion.startsWith(getRuntime().getRuntimeType().getVersion())) {
+            String message = NLS.bind(Messages.incorrectVersion, new String[] {
+                                          getRuntime().getRuntimeType().getVersion(), detectedVersion});
+            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, INCORRECT_VERSION, message,
null);
+        }
+
+        return Status.OK_STATUS;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.wst.server.core.model.RuntimeDelegate#setDefaults(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public void setDefaults(IProgressMonitor monitor) {
+        IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
+        setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.st.core.IGeronimoRuntime#getRuntimeSourceLocation()
+     */
+    public IPath getRuntimeSourceLocation() {
+        String source = (String) getServerInstanceProperties().get(RUNTIME_SOURCE);
+        if (source != null) {
+            return new Path(source);
+        }
+        return null;
+    }
+
+    public void setRuntimeSourceLocation(String path) {
+        setInstanceProperty(RUNTIME_SOURCE, path);
+    }
+
+    /**
+     * @return
+     */
+    public String detectVersion() {
+
+        URL systemjarURL = null;
+
+        //
+        // Check lib directory first
+        //
+        File libDir = getRuntime().getLocation().append("lib").toFile();
+        if (libDir.exists()) {
+            File[] libs = libDir.listFiles();
+            for (int i = 0; i < libs.length; i++) {
+                if (libs[i].getName().startsWith("geronimo-system")) {
+                    try {
+                        systemjarURL = libs[i].toURL();
+                        break;
+                    }
+                    catch (MalformedURLException e) {
+                        e.printStackTrace();
                     }
                 }
-		if (systemjarURL != null) {
-			URLClassLoader cl = new URLClassLoader(new URL[] { systemjarURL });
-			try {
-				Class clazz = cl.loadClass("org.apache.geronimo.system.serverinfo.ServerConstants");
-				Method method = clazz.getMethod("getVersion", new Class[] {});
-				return (String) method.invoke(null, null);
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * @return
-	 */
-	public String getInstallableTomcatRuntimeId() {
-		return "org.apache.geronimo.runtime.tomcat." + getRuntime().getRuntimeType().getVersion().replaceAll("\\.",
"");
-	}
-
-	/**
-	 * @return
-	 */
-	public String getInstallableJettyRuntimeId() {
-		return "org.apache.geronimo.runtime.jetty." + getRuntime().getRuntimeType().getVersion().replaceAll("\\.",
"");
-	}
-
-	/**
-	 * @return
-	 */
-	public Map getServerInstanceProperties() {
-		return getAttribute(SERVER_INSTANCE_PROPERTIES, new HashMap());
-	}
-
-	/**
-	 * @param map
-	 */
-	public void setServerInstanceProperties(Map map) {
-		setAttribute(SERVER_INSTANCE_PROPERTIES, map);
-	}
-	
-	/**
-	 * @param name
-	 * @return
-	 */
-	public String getInstanceProperty(String name) {
-		return (String) getServerInstanceProperties().get(name);
-	}
-
-	/**
-	 * @param name
-	 * @param value
-	 */
-	public void setInstanceProperty(String name, String value) {
-		Map map = getServerInstanceProperties();
-		map.put(name, value);
-		setServerInstanceProperties(map);
-	}
-
-	/**
-	 * @param vmInstall
-	 */
-	public void setVMInstall(IVMInstall vmInstall) {
-		if (vmInstall == null) {
-			setVMInstall(null, null);
-		} else
-			setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
-	}
-
-	/**
-	 * @param typeId
-	 * @param id
-	 */
-	public void setVMInstall(String typeId, String id) {
-		if (typeId == null)
-			setAttribute(PROP_VM_INSTALL_TYPE_ID, (String) null);
-		else
-			setAttribute(PROP_VM_INSTALL_TYPE_ID, typeId);
-
-		if (id == null)
-			setAttribute(PROP_VM_INSTALL_ID, (String) null);
-		else
-			setAttribute(PROP_VM_INSTALL_ID, id);
-	}
-
-	/**
-	 * @return
-	 */
-	public String getVMInstallTypeId() {
-		return getAttribute(PROP_VM_INSTALL_TYPE_ID, (String) null);
-	}
-
-	/**
-	 * @return
-	 */
-	public String getVMInstallId() {
-		return getAttribute(PROP_VM_INSTALL_ID, (String) null);
-	}
-
-	/**
-	 * @return
-	 */
-	public boolean isUsingDefaultJRE() {
-		return getVMInstallTypeId() == null;
-	}
-
-        private static List<File> scanDirectory(File dir) {
-            List<File> dirFiles = new ArrayList<File>();
-            scanDirectory(dir, dirFiles);
-            return dirFiles;
-        }
-
-        private static void scanDirectory(File dir, List<File> dirFiles) {
-            File[] files = dir.listFiles();
-            for (int ii = 0; ii < files.length; ii++) {
-                if (files[ii].isDirectory()) {
-                    scanDirectory(files[ii], dirFiles);
+            }
+        }
+
+        // 
+        // Check pre-2.1repository if necessary
+        //
+        if (systemjarURL == null) {
+            File systemDir = getRuntime().getLocation().append("repository/org/apache/geronimo/modules/geronimo-system").toFile();
+            if (systemDir.exists() && systemDir.isDirectory() && systemDir.canRead())
{
+                List<File> dirFiles = scanDirectory(systemDir);
+                for (File jarFile : dirFiles) {
+                    if (jarFile.getName().startsWith("geronimo-system") && jarFile.getName().endsWith("jar"))
{
+                        try {
+                            systemjarURL = jarFile.toURL();
+                            break;
+                        }
+                        catch (MalformedURLException e) {
+                            e.printStackTrace();
+                        }
+                    }
                 }
-                else {
-                    dirFiles.add(files[ii]);    
+            }
+        }
+
+        // 
+        // Check 2.1 repository if necessary
+        //
+        if (systemjarURL == null) {
+            File systemDir = getRuntime().getLocation().append("repository/org/apache/geronimo/framework/geronimo-system").toFile();
+            if (systemDir.exists() && systemDir.isDirectory() && systemDir.canRead())
{
+                List<File> dirFiles = scanDirectory(systemDir);
+                for (File jarFile : dirFiles) {
+                    if (jarFile.getName().startsWith("geronimo-system") && jarFile.getName().endsWith("jar"))
{
+                        try {
+                            systemjarURL = jarFile.toURL();
+                            break;
+                        }
+                        catch (MalformedURLException e) {
+                            e.printStackTrace();
+                        }
+                    }
                 }
             }
         }
-        
-}
+
+        if (systemjarURL != null) {
+            URLClassLoader cl = new URLClassLoader(new URL[] { systemjarURL});
+            try {
+                Class clazz = cl.loadClass("org.apache.geronimo.system.serverinfo.ServerConstants");
+                Method method = clazz.getMethod("getVersion", new Class[] {});
+                return(String) method.invoke(null, null);
+            }
+            catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @return
+     */
+    public String getInstallableTomcatRuntimeId() {
+        return "org.apache.geronimo.runtime.tomcat." + getRuntime().getRuntimeType().getVersion().replaceAll("\\.",
"");
+    }
+
+    /**
+     * @return
+     */
+    public String getInstallableJettyRuntimeId() {
+        return "org.apache.geronimo.runtime.jetty." + getRuntime().getRuntimeType().getVersion().replaceAll("\\.",
"");
+    }
+
+    /**
+     * @return
+     */
+    public Map getServerInstanceProperties() {
+        return getAttribute(SERVER_INSTANCE_PROPERTIES, new HashMap());
+    }
+
+    /**
+     * @param map
+     */
+    public void setServerInstanceProperties(Map map) {
+        setAttribute(SERVER_INSTANCE_PROPERTIES, map);
+    }
+
+    /**
+     * @param name
+     * @return
+     */
+    public String getInstanceProperty(String name) {
+        return(String) getServerInstanceProperties().get(name);
+    }
+
+    /**
+     * @param name
+     * @param value
+     */
+    public void setInstanceProperty(String name, String value) {
+        Map map = getServerInstanceProperties();
+        map.put(name, value);
+        setServerInstanceProperties(map);
+    }
+
+    /**
+     * @param vmInstall
+     */
+    public void setVMInstall(IVMInstall vmInstall) {
+        if (vmInstall == null) {
+            setVMInstall(null, null);
+        }
+        else
+            setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
+    }
+
+    /**
+     * @param typeId
+     * @param id
+     */
+    public void setVMInstall(String typeId, String id) {
+        if (typeId == null)
+            setAttribute(PROP_VM_INSTALL_TYPE_ID, (String) null);
+        else
+            setAttribute(PROP_VM_INSTALL_TYPE_ID, typeId);
+
+        if (id == null)
+            setAttribute(PROP_VM_INSTALL_ID, (String) null);
+        else
+            setAttribute(PROP_VM_INSTALL_ID, id);
+    }
+
+    /**
+     * @return
+     */
+    public String getVMInstallTypeId() {
+        return getAttribute(PROP_VM_INSTALL_TYPE_ID, (String) null);
+    }
+
+    /**
+     * @return
+     */
+    public String getVMInstallId() {
+        return getAttribute(PROP_VM_INSTALL_ID, (String) null);
+    }
+
+    /**
+     * @return
+     */
+    public boolean isUsingDefaultJRE() {
+        return getVMInstallTypeId() == null;
+    }
+
+    private static List<File> scanDirectory(File dir) {
+        List<File> dirFiles = new ArrayList<File>();
+        scanDirectory(dir, dirFiles);
+        return dirFiles;
+    }
+
+    private static void scanDirectory(File dir, List<File> dirFiles) {
+        File[] files = dir.listFiles();
+        for (int ii = 0; ii < files.length; ii++) {
+            if (files[ii].isDirectory()) {
+                scanDirectory(files[ii], dirFiles);
+            }
+            else {
+                dirFiles.add(files[ii]);    
+            }
+        }
+    }
+
+}
\ No newline at end of file

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.properties?rev=631023&r1=631022&r2=631023&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.properties
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/plugin.properties
Mon Feb 25 14:36:13 2008
@@ -19,7 +19,7 @@
 pluginName=Geronimo Server Tools V21 Core Plug-in
 providerName=Apache Software Foundation
 
-runtimeTypeName=Apache Geronimo v2.1 Runtime
+runtimeTypeName=Apache Geronimo v2.1
 runtimeTypeDescription=Apache Geronimo v2.1 supports Java EE 5.0.
 runtimeTypeVendor=Apache
 



Mime
View raw message