jruaux      2002/10/30 07:43:11

  Modified:    Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui
                        CactusPreferences.java
  Log:
  Polished the javadoc
  
  Revision  Changes    Path
  1.3       +75 -3     
jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/CactusPreferences.java
  
  Index: CactusPreferences.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/Eclipse-Plugin/src/java/org/apache/cactus/eclipse/ui/CactusPreferences.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CactusPreferences.java    29 Oct 2002 17:10:39 -0000      1.2
  +++ CactusPreferences.java    30 Oct 2002 15:43:11 -0000      1.3
  @@ -56,6 +56,9 @@
    */
   package org.apache.cactus.eclipse.ui;
   
  +import java.util.Vector;
  +
  +import org.apache.cactus.eclipse.containers.ant.ContainerHome;
   import org.eclipse.jface.preference.IPreferenceStore;
   
   /**
  @@ -87,7 +90,7 @@
        * The path component of the context URL preference.
        */
       public static final String CONTEXT_URL_PATH = "contextURL_Path";
  -    
  +
       /**
        * The directory of the jars needed by Cactus.
        */
  @@ -99,6 +102,21 @@
       public static final String TEMP_DIR = "temp_Dir";
   
       /**
  +     * Home directory of Tomcat 4.0.
  +     */
  +    public static final String TOMCAT40_DIR = "tomcat.40";
  +
  +    /**
  +     * Home directory of Resin 2.0.
  +     */
  +    public static final String RESIN20_DIR = "resin.20";
  + 
  +    /**
  +     * Home directory of Weblogic 7.0.
  +     */   
  +    public static final String WEBLOGIC70_DIR = "weblogic.70";
  +
  +    /**
        * Returns the context URL that should be used by the client, as 
        * configured in the plug-in preferences.
        * 
  @@ -130,7 +148,7 @@
           IPreferenceStore store = CactusPlugin.getDefault().getPreferenceStore();
           return store.getInt(CONTEXT_URL_PORT);
       }
  -    
  +
       /**
        * Returns the context URL path that should be used by the client, as 
        * configured in the plug-in preferences.
  @@ -165,5 +183,59 @@
       {
           IPreferenceStore store = CactusPlugin.getDefault().getPreferenceStore();
           return store.getString(TEMP_DIR);
  -    }    
  +    }
  +    /**
  +     * Returns the TOMCAT40_DIR.
  +     * @return String
  +     */
  +    public static String getTomcat40Dir()
  +    {
  +        IPreferenceStore store = CactusPlugin.getDefault().getPreferenceStore();
  +        return store.getString(TOMCAT40_DIR);
  +    }
  +
  +    /**
  +     * Returns the RESIN20_DIR.
  +     * @return String
  +     */
  +    public static String getResin20Dir()
  +    {
  +        IPreferenceStore store = CactusPlugin.getDefault().getPreferenceStore();
  +        return store.getString(RESIN20_DIR);
  +    }
  +
  +    /**
  +     * Returns the WEBLOGIC70_DIR.
  +     * @return String
  +     */
  +    public static String getWeblogic70Dir()
  +    {
  +        IPreferenceStore store = CactusPlugin.getDefault().getPreferenceStore();
  +        return store.getString(WEBLOGIC70_DIR);
  +    }
  +    
  +    /**
  +     * Returns the ContainerHome array.
  +     * @return String
  +     */
  +    public static ContainerHome[] getContainerHomes()
  +    {
  +        Vector containerHomes = new Vector();
  +        if (!getTomcat40Dir().equals(""))
  +        {
  +            containerHomes.addElement(
  +                new ContainerHome(TOMCAT40_DIR, getTomcat40Dir()));
  +        }
  +        if (!getResin20Dir().equals(""))
  +        {
  +            containerHomes.addElement(
  +                new ContainerHome(RESIN20_DIR, getResin20Dir()));
  +        }
  +        if (!getWeblogic70Dir().equals(""))
  +        {
  +            containerHomes.addElement(
  +                new ContainerHome(WEBLOGIC70_DIR, getWeblogic70Dir()));
  +        }
  +        return (ContainerHome[]) containerHomes.toArray(new ContainerHome[0]);
  +    }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:cactus-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-dev-help@;jakarta.apache.org>

Reply via email to