You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2014/11/18 21:49:24 UTC

svn commit: r1640423 - in /jmeter/trunk/src: core/org/apache/jmeter/functions/ core/org/apache/jmeter/gui/ core/org/apache/jmeter/gui/action/ core/org/apache/jmeter/gui/util/ reports/org/apache/jmeter/gui/util/

Author: fschumacher
Date: Tue Nov 18 20:49:24 2014
New Revision: 1640423

URL: http://svn.apache.org/r1640423
Log:
Bug 57193: Add param and return tags to javadoc
Bugzilla Id: 57193

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/functions/Function.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java
    jmeter/trunk/src/reports/org/apache/jmeter/gui/util/DirectoryPanel.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/functions/Function.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/functions/Function.java?rev=1640423&r1=1640422&r2=1640423&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/functions/Function.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/functions/Function.java Tue Nov 18 20:49:24 2014
@@ -36,6 +36,10 @@ public interface Function {
      *
      * This method must be threadsafe - multiple threads will be using the same
      * object.
+     * @param previousResult The previous {@link SampleResult}
+     * @param currentSampler The current {@link Sampler}
+     * @return The replacement value, which was generated by the function
+     * @throws InvalidVariableException - when the variables for the function call can't be evaluated
      */
     String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException;
 
@@ -45,14 +49,15 @@ public interface Function {
      * execute() method of the CompoundVariable (which should be done at
      * execution.)
      *
-     * @param parameters
-     * @throws InvalidVariableException
+     * @param parameters The parameters for the function call
+     * @throws InvalidVariableException - when the variables for the function call can't be evaluated
      */
     void setParameters(Collection<CompoundVariable> parameters) throws InvalidVariableException;
 
     /**
      * Return the name of your function. Convention is to prepend "__" to the
      * name (ie "__regexFunction")
+     * @return The name of the funtion
      */
     String getReferenceKey();
 
@@ -65,6 +70,7 @@ public interface Function {
      * This list is not optional. If you don't wish to write help, you must at
      * least return a List containing the correct number of blank strings, one
      * for each argument.
+     * @return List with brief descriptions for each parameter the function takes
      */
     List<String> getArgumentDesc();
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java?rev=1640423&r1=1640422&r2=1640423&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/SavePropertyDialog.java Tue Nov 18 20:49:24 2014
@@ -68,10 +68,11 @@ public class SavePropertyDialog extends 
         log.warn("Constructor only intended for use in testing"); // $NON-NLS-1$
     }
     /**
-     * @param owner
-     * @param title
-     * @param modal
-     * @throws java.awt.HeadlessException
+     * @param owner The {@link Frame} from which the dialog is displayed
+     * @param title The string to be used as a title of this dialog
+     * @param modal specifies whether the dialog should be modal
+     * @param s The details, which sample attributes are to be saved
+     * @throws java.awt.HeadlessException - when run headless
      */
     public SavePropertyDialog(Frame owner, String title, boolean modal, SampleSaveConfiguration s)
     // throws HeadlessException

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java?rev=1640423&r1=1640422&r2=1640423&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/LoadRecentProject.java Tue Nov 18 20:49:24 2014
@@ -244,6 +244,8 @@ public class LoadRecentProject extends L
 
     /**
      * Get the full path to the recent file where index 0 is the most recent
+     * @param index the index of the recent file
+     * @return full path to the recent file at <code>index</code>
      */
     public static String getRecentFile(int index) {
         return prefs.get(USER_PREFS_KEY + index, null);

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java?rev=1640423&r1=1640422&r2=1640423&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileDialoger.java Tue Nov 18 20:49:24 2014
@@ -44,11 +44,35 @@ public final class FileDialoger {
     private FileDialoger() {
     }
 
-
+    /**
+     * Prompts the user to choose a file from their filesystems for our own
+     * devious uses. This method maintains the last directory the user visited
+     * before dismissing the dialog. This does NOT imply they actually chose a
+     * file from that directory, only that they closed the dialog there. It is
+     * the caller's responsibility to check to see if the selected file is
+     * non-null.
+     *
+     * @return the JFileChooser that interacted with the user, after they are
+     *         finished using it - null if no file was chosen
+     */
     public static JFileChooser promptToOpenFile() {
         return promptToOpenFile((String)null);
     }
 
+    /**
+     * Prompts the user to choose a file from their filesystems for our own
+     * devious uses. This method maintains the last directory the user visited
+     * before dismissing the dialog. This does NOT imply they actually chose a
+     * file from that directory, only that they closed the dialog there. It is
+     * the caller's responsibility to check to see if the selected file is
+     * non-null.
+     * @param existingFileName The name of a file with path. If the filename points
+     *             to an existing file, the directory in which it lies, will be used
+     *             as the starting point for the returned JFileChooser.
+     *
+     * @return the JFileChooser that interacted with the user, after they are
+     *         finished using it - null if no file was chosen
+     */
     public static JFileChooser promptToOpenFile(String existingFileName) {
         return promptToOpenFile(new String[0], existingFileName);
     }
@@ -60,6 +84,8 @@ public final class FileDialoger {
      * file from that directory, only that they closed the dialog there. It is
      * the caller's responsibility to check to see if the selected file is
      * non-null.
+     * @param exts The list of allowed file extensions. If empty, any
+     *             file extension is allowed
      *
      * @return the JFileChooser that interacted with the user, after they are
      *         finished using it - null if no file was chosen
@@ -75,6 +101,11 @@ public final class FileDialoger {
      * file from that directory, only that they closed the dialog there. It is
      * the caller's responsibility to check to see if the selected file is
      * non-null.
+     * @param exts The list of allowed file extensions. If empty, any
+     *             file extension is allowed
+     * @param existingFileName The name of a file with path. If the filename points
+     *             to an existing file, the directory in which it lies, will be used
+     *             as the starting point for the returned JFileChooser.
      *
      * @return the JFileChooser that interacted with the user, after they are
      *         finished using it - null if no file was chosen
@@ -128,6 +159,9 @@ public final class FileDialoger {
      * file from that directory, only that they closed the dialog there. It is
      * the caller's responsibility to check to see if the selected file is
      * non-null.
+     * @param filename  The name of a file with path. If the filename points
+     *             to an existing file, the directory in which it lies, will be used
+     *             as the starting point for the returned JFileChooser.
      *
      * @return the JFileChooser that interacted with the user, after they are
      *         finished using it - null if no file was chosen
@@ -181,7 +215,7 @@ public final class FileDialoger {
     
     /**
      * 
-     * @return last JFC Directory
+     * @return The last directory visited by the user while choosing Files
      */
     public static String getLastJFCDirectory() {
         return lastJFCDirectory;
@@ -189,7 +223,7 @@ public final class FileDialoger {
     
     /**
      * 
-     * @param lastJFCDirectory
+     * @param lastJFCDirectory The last directory visited by the user while choosing Files
      */
     public static void setLastJFCDirectory(String lastJFCDirectory) {
         FileDialoger.lastJFCDirectory = lastJFCDirectory;

Modified: jmeter/trunk/src/reports/org/apache/jmeter/gui/util/DirectoryPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/reports/org/apache/jmeter/gui/util/DirectoryPanel.java?rev=1640423&r1=1640422&r2=1640423&view=diff
==============================================================================
--- jmeter/trunk/src/reports/org/apache/jmeter/gui/util/DirectoryPanel.java (original)
+++ jmeter/trunk/src/reports/org/apache/jmeter/gui/util/DirectoryPanel.java Tue Nov 18 20:49:24 2014
@@ -52,16 +52,26 @@ public class DirectoryPanel extends Hori
     private final Color background;
 
     /**
-     * Constructor for the FilePanel object.
+     * Constructor for the FilePanel object. No {@link ChangeListener} is registered
+     * and an empty title is assumed. 
      */
     public DirectoryPanel() {
         this("", null); // $NON-NLS-1$
     }
 
+    /**
+     * Constructor for the FilePanel object. No {@link ChangeListener} is registered.
+     * @param title
+     */
     public DirectoryPanel(String title) {
         this(title, null);
     }
 
+    /**
+     * Constructor for the FilePanel object. No {@link ChangeListener} is registered.
+     * @param title The title of the panel
+     * @param bk The {@link Color} of the background of this panel
+     */
     public DirectoryPanel(String title, Color bk) {
         this.title = title;
         this.background = bk;
@@ -69,12 +79,18 @@ public class DirectoryPanel extends Hori
     }
     /**
      * Constructor for the FilePanel object.
+     * @param l The {@link ChangeListener} to which we report events
+     * @param title The title of the panel
      */
     public DirectoryPanel(ChangeListener l, String title) {
         this(title);
         listeners.add(l);
     }
 
+    /**
+     * Add a {@link ChangeListener} to this panel
+     * @param l The {@link ChangeListener} to add
+     */
     public void addChangeListener(ChangeListener l) {
         listeners.add(l);
     }
@@ -94,7 +110,7 @@ public class DirectoryPanel extends Hori
     /**
      * If the gui needs to enable/disable the FilePanel, call the method.
      *
-     * @param enable
+     * @param enable specifies whether the FilePanel should be enabled or disabled
      */
     public void enableFile(boolean enable) {
         browse.setEnabled(enable);