You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by jr...@apache.org on 2003/04/10 14:03:55 UTC

cvs commit: jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui CactusMessages.properties CactusPlugin.java CactusPreferences.java ContainersPreferencePage.java

jruaux      2003/04/10 05:03:55

  Modified:    integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui
                        CactusMessages.properties CactusPlugin.java
                        CactusPreferences.java
                        ContainersPreferencePage.java
  Log:
  Added ability to specify configuration file jetty.xml
  
  Revision  Changes    Path
  1.3       +7 -10     jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui/CactusMessages.properties
  
  Index: CactusMessages.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui/CactusMessages.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CactusMessages.properties	17 Mar 2003 09:45:42 -0000	1.2
  +++ CactusMessages.properties	10 Apr 2003 12:03:54 -0000	1.3
  @@ -39,15 +39,12 @@
   CactusPreferencePage.label.context = Context:
   CactusPreferencePage.label.temp = Temp directory:
   CactusPreferencePage.label.webapp = Web App relative directory:
  +CactusPreferencePage.protocol.init = http
  +CactusPreferencePage.host.init = localhost
  +CactusPreferencePage.port.init = 8080
  +CactusPreferencePage.context.init = test
   ContainersPreferencePage.description = Preferences for the containers
  -ContainersPreferencePage.label.tomcat4x = Tomcat 4.x home directory:
  -ContainersPreferencePage.label.resin20 = Resin 2.0 home directory:
  -ContainersPreferencePage.label.weblogic70 = Weblogic 7.0 home directory:
  -CactusPreferencePage.label.protocol.init = http
  -CactusPreferencePage.label.host.init = localhost
  -CactusPreferencePage.label.port.init = 8080
  -CactusPreferencePage.label.context.init = test
  -CactusPreferencePage.label.jars.init = C:/jakarta-cactus-13-1.4b1/lib
  -CactusPreferencePage.label.webapp.init = src/webapp
  +ContainersPreferencePage.label.jettyxml = Location of jetty.xml
  +ContainersPreferencePage.jettyxml.init = D:/jetty.xml
   
   Cactify.message.error = Could not set the classpath of the project
  
  
  
  1.6       +9 -12     jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui/CactusPlugin.java
  
  Index: CactusPlugin.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui/CactusPlugin.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CactusPlugin.java	28 Mar 2003 09:17:37 -0000	1.5
  +++ CactusPlugin.java	10 Apr 2003 12:03:54 -0000	1.6
  @@ -228,30 +228,27 @@
           theStore.setDefault(
               CactusPreferences.CONTEXT_URL_SCHEME,
               CactusMessages.getString(
  -                "CactusPreferencePage.label.protocol.init"));
  +                "CactusPreferencePage.protocol.init"));
           theStore.setDefault(
               CactusPreferences.CONTEXT_URL_HOST,
  -            CactusMessages.getString("CactusPreferencePage.label.host.init"));
  +            CactusMessages.getString("CactusPreferencePage.host.init"));
           theStore.setDefault(
               CactusPreferences.CONTEXT_URL_PORT,
  -            CactusMessages.getString("CactusPreferencePage.label.port.init"));
  +            CactusMessages.getString("CactusPreferencePage.port.init"));
           theStore.setDefault(
               CactusPreferences.CONTEXT_URL_PATH,
               CactusMessages.getString(
  -                "CactusPreferencePage.label.context.init"));
  -        theStore.setDefault(
  -            CactusPreferences.JARS_DIR,
  -            CactusMessages.getString("CactusPreferencePage.label.jars.init"));
  +                "CactusPreferencePage.context.init"));
           theStore.setDefault(
               CactusPreferences.TEMP_DIR,
               System.getProperty("java.io.tmpdir"));
           theStore.setDefault(
  -            CactusPreferences.WEBAPP_DIR,
  -            CactusMessages.getString("CactusPreferencePage.label.webapp.init"));
  -        theStore.setDefault(
               CactusPreferences.JETTY,
               true
           );
  +        theStore.setDefault(
  +            CactusPreferences.JETTY_XML,
  +            CactusMessages.getString("ContainersPreferencePage.jettyxml.init"));
       }
   
       /**
  
  
  
  1.4       +22 -55    jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui/CactusPreferences.java
  
  Index: CactusPreferences.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui/CactusPreferences.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CactusPreferences.java	27 Mar 2003 14:54:42 -0000	1.3
  +++ CactusPreferences.java	10 Apr 2003 12:03:54 -0000	1.4
  @@ -91,30 +91,23 @@
       public static final String CONTEXT_URL_PATH = "contextURL_Path";
   
       /**
  -     * The directory of the jars needed by Cactus.
  -     */
  -    public static final String JARS_DIR = "jars_Dir";
  -
  -    /**
        * The temp directory used by the plugin to set up containers.
        */
       public static final String TEMP_DIR = "temp_Dir";
   
       /**
  -     * The directory where the plugin can find the web application.
  +     * id for the Jetty container selection preference.
        */
  -    public static final String WEBAPP_DIR = "webapp_Dir";
  +    public static final String JETTY = "jetty";
   
       /**
  -     * id for the Jetty container selection preference.
  +     * id for the jetty.xml location preference.
        */
  -    public static final String JETTY = "jetty";
  +    public static final String JETTY_XML = "jetty_xml";
   
       /**
  -     * Returns the context URL that should be used by the client, as 
  +     * @return the context URL that should be used by the client, as 
        * configured in the plug-in preferences.
  -     * 
  -     * @return the context URL
        */
       public static String getContextURL()
       {
  @@ -134,10 +127,8 @@
       }
   
       /**
  -     * Returns the context URL port that should be used by the client, as 
  +     * @return the context URL port that should be used by the client, as 
        * configured in the plug-in preferences.
  -     * 
  -     * @return the context port
        */
       public static int getContextURLPort()
       {
  @@ -149,10 +140,8 @@
       }
   
       /**
  -     * Returns the context URL path that should be used by the client, as 
  +     * @return the context URL path that should be used by the client, as 
        * configured in the plug-in preferences.
  -     * 
  -     * @return the context path
        */
       public static String getContextURLPath()
       {
  @@ -164,24 +153,8 @@
       }
   
       /**
  -     * Returns the directory containing the jars needed by cactus, as 
  -     * configured in the plug-in preferences.
  -     * 
  -     * @return the context path
  -     */
  -    public static String getJarsDir()
  -    {
  -        IPreferenceStore store = CactusPlugin.getDefault().getPreferenceStore();
  -        String result = store.getString(JARS_DIR);
  -        CactusPlugin.log("Cactus preference : JarsDir = [" + result + "]");
  -        return result;
  -    }
  -
  -    /**
  -     * Returns the temp directory used by cactus, as 
  +     * @return the temp directory used by cactus, as 
        * configured in the plug-in preferences.
  -     * 
  -     * @return the context path
        */
       public static String getTempDir()
       {
  @@ -192,23 +165,8 @@
       }
   
       /**
  -     * Returns the Webapp directory used by cactus, as 
  -     * configured in the plug-in preferences.
  -     * 
  -     * @return the context path
  -     */
  -    public static String getWebappDir()
  -    {
  -        IPreferenceStore store = CactusPlugin.getDefault().getPreferenceStore();
  -        String result = store.getString(WEBAPP_DIR);
  -        CactusPlugin.log("Cactus preference : WebappDir = [" + result + "]");
  -        return result;
  -    }
  -
  -    /**
  -     * Returns the home directory for the given container id.
        * @param theContainerId container id
  -     * @return String
  +     * @return the home directory for the given container id.
        */
       public static String getContainerDir(String theContainerId)
       {
  @@ -220,7 +178,6 @@
       }
   
       /**
  -     * Returns true if Jetty is selected.
        * @return true if Jetty is selected
        */
       public static boolean getJetty()
  @@ -232,8 +189,18 @@
       }
   
       /**
  -     * Returns the ContainerHome array.
  -     * @return String
  +     * @return the jetty.xml location
  +     */
  +    public static String getJettyXML()
  +    {
  +        IPreferenceStore store = CactusPlugin.getDefault().getPreferenceStore();
  +        String result = store.getString(JETTY_XML);
  +        CactusPlugin.log("Cactus preference : jetty.xml = [" + result + "]");
  +        return result;
  +    }
  +
  +    /**
  +     * @return the ContainerHome array
        */
       public static Hashtable getContainerHomes()
       {
  
  
  
  1.4       +9 -2      jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui/ContainersPreferencePage.java
  
  Index: ContainersPreferencePage.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/integration/eclipse/org.apache.cactus.eclipse.runner/src/java/org/apache/cactus/eclipse/runner/ui/ContainersPreferencePage.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContainersPreferencePage.java	27 Mar 2003 14:54:42 -0000	1.3
  +++ ContainersPreferencePage.java	10 Apr 2003 12:03:54 -0000	1.4
  @@ -59,6 +59,7 @@
   import org.eclipse.jface.preference.BooleanFieldEditor;
   import org.eclipse.jface.preference.DirectoryFieldEditor;
   import org.eclipse.jface.preference.FieldEditorPreferencePage;
  +import org.eclipse.jface.preference.FileFieldEditor;
   import org.eclipse.ui.IWorkbench;
   import org.eclipse.ui.IWorkbenchPreferencePage;
   
  @@ -119,7 +120,13 @@
                   "Jetty",
                   BooleanFieldEditor.SEPARATE_LABEL,
                   getFieldEditorParent()));
  -
  +        FileFieldEditor jettyXML =
  +            new FileFieldEditor(
  +                CactusPreferences.JETTY_XML,
  +                CactusMessages.getString(
  +                    "ContainersPreferencePage.label.jettyxml"),
  +                getFieldEditorParent());
  +        addField(jettyXML);
       }
   
       /**
  
  
  

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